Skip to content

Instantly share code, notes, and snippets.

View takluyver's full-sized avatar

Thomas Kluyver takluyver

View GitHub Profile
@takluyver
takluyver / gist:887333
Created March 25, 2011 18:28
IPython Qtconsole Windows ls traceback
C:\python\external\ipython>ipython-qtconsole
Starting the kernel at pid: 2216
XREP Channel on port 4380
PUB Channel on port 4381
REQ Channel on port 4382
Heartbeat REP Channel on port 4383
To connect another client to this kernel, use:
-e --xreq 4380 --sub 4381 --rep 4382 --hb 4383
---------------------------------------------------------------------------
@takluyver
takluyver / gist:914402
Created April 11, 2011 21:35
IPython pylabtools test error
======================================================================
ERROR: test (IPython.lib.tests.test_pylabtools.test_figure_to_svg)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/thomas/Code/virtualenvs/ipy-trunk/lib/python2.6/site-packages/IPython/testing/_paramtestpy2.py", line 53, in run_parametric
testgen.next()
File "/home/thomas/Code/virtualenvs/ipy-trunk/lib/python2.6/site-packages/IPython/lib/tests/test_pylabtools.py", line 49, in test_figure_to_svg
fig, ax = plt.subplots()
AttributeError: 'module' object has no attribute 'subplots'
@takluyver
takluyver / gist:954331
Created May 3, 2011 21:44
IPython test failure - Python 2.7
======================================================================
FAIL: Test the IPython runner.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/thomas/Code/virtualenvs/ipy-trunk/lib/python2.7/site-packages/IPython/lib/tests/test_irunner.py", line 130, in testIPython
self._test_runner(runner,source,output)
File "/home/thomas/Code/virtualenvs/ipy-trunk/lib/python2.7/site-packages/IPython/lib/tests/test_irunner.py", line 57, in _test_runner
mismatch)
AssertionError: Number of mismatched lines: 1
'Number of mismatched lines: 1' = self._formatMessage('Number of mismatched lines: 1', "%s is not true" % safe_repr(False))
@takluyver
takluyver / gist:985716
Created May 22, 2011 18:04
rpy2 test failures with Python 3.2
thomas@thomas-desktop:~$ python3 -m rpy2.tests
.E...Traceback (most recent call last):
File "/tmp/tmpm66dxe.py", line 4, in <module>
import rpy2.rinterface as ri
File "/usr/local/lib/python3.2/dist-packages/rpy2/rinterface/__init__.py", line 79, in <module>
from rpy2.rinterface._rinterface import *
ImportError: No module named _rinterface
......../usr/local/lib/python3.2/dist-packages/rpy2/rinterface/tests/test_EmbeddedR.py:324: DeprecationWarning: Please use assertEqual instead.
self.assertEquals("Doesn't work.", str(sys.last_value))
.......................................................................................F....................................................................................................................................................................F...............................................
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only">
<info>
<title>Trends Journals</title>
<id>http://www.zotero.org/styles/trends-journal</id>
<link href="http://www.zotero.org/styles/trends-journal" rel="self"/>
<author>
<name>Adam Zeilinger</name>
<email>arzeilinger@gmail.com</email>
</author>
@takluyver
takluyver / gist:1101890
Created July 23, 2011 21:14
Get issues from JSON API
import json
from urllib import urlopen
def get_issues(project="ipython/ipython/", state="open"):
f = urlopen("http://github.com/api/v2/json/issues/list/%s%s" % (project, state))
return json.load(f)['issues']
def _parse_datetime(s):
"""Parse dates in the format returned by the Github API"""
return datetime.strptime(s.rpartition(")[0], ")
@takluyver
takluyver / gist:1118000
Created August 1, 2011 11:49
IPython crash traceback
***************************************************************************
Crash traceback:
---------------------------------------------------------------------------
KeyboardInterrupt Python 2.6.6: /home/ben/dev/ve/ticket-manager/bin/python
Mon Aug 1 12:21:42 2011
A problem occured executing Python code. Here is the sequence of function
calls leading up to the error, with the most recent (innermost) call last.
/usr/lib/python2.6/atexit.pyc in _run_exitfuncs()
@takluyver
takluyver / gist:1118181
Created August 1, 2011 14:06
IPython.parallel test failures
iptest IPython.parallel
..............................................................FSSSSSSSSSS.................................F
======================================================================
FAIL: test graceful handling of engine death (balanced)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/thomas/code/virtualenvs/ipy-trunk/lib/python2.7/site-packages/IPython/parallel/tests/test_lbview.py", line 44, in test_z_crash_task
self.assertRaisesRemote(error.EngineError, ar.get, 10)
File "/home/thomas/code/virtualenvs/ipy-trunk/lib/python2.7/site-packages/IPython/parallel/tests/clienttest.py", line 109, in assertRaisesRemote
self.assertEquals(etype.__name__, e.ename, "Should have raised %r, but raised %r"%(etype.__name__, e.ename))
@takluyver
takluyver / gist:1118274
Created August 1, 2011 14:49
IPython Qtconsole crash report
***************************************************************************
IPython post-mortem report
{'commit_hash': '464280a',
'commit_source': 'installation',
'ipython_path': 'c:\\python26\\lib\\site-packages\\IPython',
'ipython_version': '0.11',
'os_name': 'nt',
'platform': 'Windows-XP-5.1.2600-SP2',
@takluyver
takluyver / gist:1281034
Created October 12, 2011 11:55
Plotting pandas columns
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
/home/thomas/Experiments/Emergence depth/<ipython-input-5-1c9d8c0f3fd8> in <module>()
----> 1 plot(soy_w['Depth'])
/home/thomas/code/virtualenvs/mpl/lib/python2.7/site-packages/matplotlib/pyplot.pyc in plot(*args, **kwargs)
2284 ax.hold(hold)
2285 try:
-> 2286 ret = ax.plot(*args, **kwargs)
2287 draw_if_interactive()