Quantcast

[IPython-User] matplotlib demo - unreadable json

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[IPython-User] matplotlib demo - unreadable json

Neal Becker
I tried to follow the mpl tutuorial:

http://marakana.com/s/advanced_matplotlib_tutorial_with_library_author_john_hunter,1133/index.html#c132880

I did:
wget http://bit.ly/Ancxno
unzip ...

Then
 ipython notebook --pylab=inlib
[NotebookApp] Using existing profile dir:
u'/home/nbecker/.config/ipython/profile_default'
[NotebookApp] The IPython Notebook is running at: http://127.0.0.1:8888
[NotebookApp] Use Control-C to stop this server and shut down all kernels.
[NotebookApp] Using local MathJax
WARNING:root:500 GET /notebooks/790bb9a3-5794-4e80-
b490-5fda461fcacb?_=1334321151178 (127.0.0.1): Unreadable JSON notebook.
ERROR:root:500 GET /notebooks/790bb9a3-5794-4e80-
b490-5fda461fcacb?_=1334321151178 (127.0.0.1) 11.49ms

_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: matplotlib demo - unreadable json

Fernando Perez
On Fri, Apr 13, 2012 at 5:50 AM, Neal Becker <[hidden email]> wrote:

> I tried to follow the mpl tutuorial:
>
> http://marakana.com/s/advanced_matplotlib_tutorial_with_library_author_john_hunter,1133/index.html#c132880
>
> I did:
> wget http://bit.ly/Ancxno
> unzip ...
>
> Then
>  ipython notebook --pylab=inlib

You should type 'inline', not 'inlib'.

> [NotebookApp] Using existing profile dir:
> u'/home/nbecker/.config/ipython/profile_default'
> [NotebookApp] The IPython Notebook is running at: http://127.0.0.1:8888
> [NotebookApp] Use Control-C to stop this server and shut down all kernels.
> [NotebookApp] Using local MathJax
> WARNING:root:500 GET /notebooks/790bb9a3-5794-4e80-
> b490-5fda461fcacb?_=1334321151178 (127.0.0.1): Unreadable JSON notebook.

You are most likely using the 0.12 notebook. That zip file has
notebooks in format version 2 and version 3, but IPython 0.12 only
understand v2 notebooks.  Simply ignore the files that don't have 'v2'
in their name, and use the 'v2' files.

Cheers,

f
_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: matplotlib demo - unreadable json

ilanman
Hi there, I am getting the exact same error.

When I launch "python notebook --pylab inline", everyone launches in my browser as its supposed to, but the notebook that I click on (which was in the directory from which I launed ipython notebook) is empty. There is no code there. My terminal yields that same error:


Ilan-Mans-MacBook-Pro:04 ilanman$ ipython notebook --pylab inline
[NotebookApp] Using existing profile dir: u'/Users/ilanman/.ipython/profile_default'
[NotebookApp] The IPython Notebook is running at: http://127.0.0.1:8888
[NotebookApp] Use Control-C to stop this server and shut down all kernels.
[NotebookApp] Using MathJax from CDN
WARNING:root:500 GET /notebooks/d479b1f0-d1af-4aea-80a1-280f9bfc379e?_=1350681835641 (127.0.0.1): Unreadable JSON notebook.
ERROR:root:500 GET /notebooks/d479b1f0-d1af-4aea-80a1-280f9bfc379e?_=1350681835641 (127.0.0.1) 56.46ms

I just installed ipython via Enthought. I'm using Python 2.7.3. I'm not sure how to "use v2" instead of v3. I don't know where to direct it to "use" v2. Any help would be greatly appreciated.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: matplotlib demo - unreadable json

Jonathan March-2
On Fri, Oct 19, 2012 at 4:34 PM, ilanman <[hidden email]> wrote:
Hi there, I am getting the exact same error.

When I launch "python notebook --pylab inline", everyone launches in my
browser as its supposed to, but the notebook that I click on (which was in
the directory from which I launed ipython notebook) is empty. There is no
code there. My terminal yields that same error:


Ilan-Mans-MacBook-Pro:04 ilanman$ ipython notebook --pylab inline
[NotebookApp] Using existing profile dir:
u'/Users/ilanman/.ipython/profile_default'
[NotebookApp] The IPython Notebook is running at: http://127.0.0.1:8888
[NotebookApp] Use Control-C to stop this server and shut down all kernels.
[NotebookApp] Using MathJax from CDN
WARNING:root:500 GET
/notebooks/d479b1f0-d1af-4aea-80a1-280f9bfc379e?_=1350681835641 (127.0.0.1):
Unreadable JSON notebook.
ERROR:root:500 GET
/notebooks/d479b1f0-d1af-4aea-80a1-280f9bfc379e?_=1350681835641 (127.0.0.1)
56.46ms

I just installed ipython via Enthought. I'm using Python 2.7.3. I'm not sure
how to "use v2" instead of v3. I don't know where to direct it to "use" v2.
Any help would be greatly appreciated

Hi Ilan, Yes, EPD 2.7.3 shipped with ipython 0.12.x 
To update to 0.13:
$ enpkg enstaller
$ enpkg ipython
(precede these with sudo if you are on OSX, or installed to a non-user-writeable dir in Linux)

Note that the ipython that you will get this way will say that it is 0.13.1-1. This is false; it is really 0.13. We plan to have ipython 0.13.1-2 egg available early this week, which really will be the just-released 0.13.1.

hth,
Jonathan

_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: matplotlib demo - unreadable json

kesten
This post was updated on .
I have a lot of notebooks i'm currently working on.

I tried to do a parallel install of enthought's EPD distro

I have my files in home/ipy  and launch ipython notebook from there.
I didn't have issues for a few days, but then after a kernel crash, i get blank pages for all my notebooks as described in this thread with the Unreadable JSON error.

KBoughton-MacBook-Pro-2:ipy kbroughton$ which python
/Library/Frameworks/Python.framework/Versions/Current/bin/python

KBoughton-MacBook-Pro-2:Versions kbroughton$ ls -al
lrwxr-xr-x   1 root   wheel    3 Jan 12 17:37 Current -> 7.3

KBoughton-MacBook-Pro-2:ipy kbroughton$ ipython --version
0.12.1

any suggestions how to get my old notebooks working again?

kesten
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: matplotlib demo - unreadable json

Matthias Bussonnier

Le 24 janv. 2013 à 06:15, kesten a écrit :

I have a lot of v2 workbooks that i'm currently using.
I just upgraded today.  Is the a way to convert them, or switch to v2
reader?

Notebook should auto upgrade if you load them with the new version. 
We highly discourage people from staying on V2, still if you really need to downgrade, 
you can use something like that : https://gist.github.com/1935808
but make backup before. 

-- 
Matthias


kesten



--
View this message in context: http://python.6.n6.nabble.com/IPython-User-matplotlib-demo-unreadable-json-tp4878443p5003266.html
Sent from the IPython - User mailing list archive at Nabble.com.
_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user


_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: matplotlib demo - unreadable json

kesten
"highly discourage using v2 notebooks"

Thanks for the quick reply.

It turns out I had reported the problem incorrectly.
I assumed that the enthought was an update, but it seems IT is the one with the older notebook version.
So when i tried to open my newer v3 notebooks i got the Unreadable JSON error.

My fix was to uninstall the EPD according to http://www.enthought.com/products/epdgetstart.php?platform=mac

 $ cd /Library/Frameworks/Python.framework/Versions
# mine was version 7.3
$ sudo rm -rf 7.2
 $ cd /Applications
 $ sudo rm -rf Enthought

However, i then got an error just running python at the prompt until i commented out the lines in my bash profile that EPD had inserted:

on mac ~/.bash_profile (probably ~/.bashrc on linux)
# Setting PATH for EPD_free-7.3-2
# The orginal version is saved in .bash_profile.pysave
#PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"

I had installed Enthought because i wanted to use the Traits package.  If i reinstall, i will use virtualenv or install by component.

thanks again,

kesten
Loading...