[IPython-dev] rubbish null bytes at the end of ipynb file

Gregor Thalhammer gregor.thalhammer at gmail.com
Mon Jan 20 11:59:31 EST 2014


Dear developers,

sometimes it happens to me that at the very end of my notebook files null bytes (0x00) are appended (I observed between 2 and several hundreds) . The notebook files fail to load ('bad request') the next time. Also nbconvert fails:
...
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/nbformat/reader.py", line 44, in parse_json
    raise NotJSONError(("Notebook does not appear to be JSON: %r" % s)[:77] + "...")
NotJSONError: Notebook does not appear to be JSON: u'{\n "metadata": {\n  "name": ""\n },\n...

Luckily such an file can be resurrected by deleting the null bytes.
This only happens sometimes, but with a file containing a lot of inline pylab figures (png) and heavy recreating of figures this happens quite often.

What could I do to localize the root of this problem?

I am using recent ipython from git, with python 2.7 on osx 10.9.

thanks for your help
Gregor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140120/96ca2c76/attachment.html>


More information about the IPython-dev mailing list