[IPython-dev] kernel die with : 'module' object has no attribute 'dumps'

epi massimodisasha@gmail....
Sat Feb 23 07:57:01 CST 2013


Hi,

i was using my notebook in the last days (3?) ansi had a repeated "dead kernel" message

from bash i can see this log :


mdistefano@epinux:~$ ipython notebook
[NotebookApp] Using existing profile dir: u'/home/mdistefano/.ipython/profile_default'
[NotebookApp] Serving notebooks from local directory: /home/mdistefano/dev/ecoop/trunk/python/notebook/
[NotebookApp] The IPython Notebook is running at: http://128.128.89.215:10000/
[NotebookApp] Use Control-C to stop this server and shut down all kernels.
[NotebookApp] Using MathJax from CDN: http://cdn.mathjax.org/mathjax/latest/MathJax.js
[NotebookApp] Kernel started: c0f6500e-bcaa-4ebc-80e6-79119b44a8a1
[NotebookApp] Connecting to: tcp://127.0.0.1:34385
DATA: [{'a': 'A', 'c': 3.0, 'b': (2, 4)}]
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/IPython/kernel/__init__.py", line 3, in <module>
    from .connect import *
  File "/usr/local/lib/python2.7/dist-packages/IPython/kernel/connect.py", line 21, in <module>
    import json
  File "json.py", line 11, in <module>
    data_string = json.dumps(data)
AttributeError: 'module' object has no attribute 'dumps'
[NotebookApp] Connecting to: tcp://127.0.0.1:34978
[NotebookApp] Connecting to: tcp://127.0.0.1:43877
[NotebookApp] Kernel died: c0f6500e-bcaa-4ebc-80e6-79119b44a8a1



but from a standard IPython session i can do something like :

epy@epinux:~$ ipython
Python 2.7.3 (default, Jan  2 2013, 13:56:14) 
Type "copyright", "credits" or "license" for more information.

IPython 1.0.dev -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import json

In [2]: json.dumps('data')
Out[2]: '"data"'


Probably something wrong on my environment, but i'm not sure, i'm tying to investigate :/

thanks for any help,


--Massimo.



More information about the IPython-dev mailing list