Quantcast

[IPython-User] Notebook: console is not defined

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

[IPython-User] Notebook: console is not defined

klo uo
I tried to run IPython notebook in Prism 1.04 (which is abandoned
project, but works fine for various other things), and I get main
window but can't open notebook page or reuse existing notebooks (they
are not listed, although exist in default folder)

I opened error console and get error about 'console not defined'
pointing to "notebook.js" which I attached as screenshot

There are also warnings, like 'reference to undefined property' and
'unknown pseudoclass or pseudo element' for "jquery-1.6.2.js", but I
guess those warning are not so important
I tried '--no-mathjax' also, but get same error

So I'm wondering if I could dedicate IPython Notebook to Prism web app

Thanks

_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user

Screenshot.png (134K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Notebook: console is not defined

Brian Granger-3
The IPython notebook assumes a pretty traditional, but extremely
modern web browser and I am guessing that Prism doesn't quite meet
that standard.  We use lots of cutting edge things like WebSockets and
the flexible box model.

On Tue, Jan 31, 2012 at 9:13 PM, klo uo <[hidden email]> wrote:
> I tried to run IPython notebook in Prism 1.04 (which is abandoned
> project, but works fine for various other things), and I get main
> window but can't open notebook page or reuse existing notebooks (they
> are not listed, although exist in default folder)
>
> I opened error console and get error about 'console not defined'
> pointing to "notebook.js" which I attached as screenshot

The console variable is present on all modern browsers and prints
messages to the Javascript debugging console.  I don't foresee that we
would remove all calls to console.log anytime soon.

> There are also warnings, like 'reference to undefined property' and
> 'unknown pseudoclass or pseudo element' for "jquery-1.6.2.js", but I
> guess those warning are not so important
> I tried '--no-mathjax' also, but get same error

I am guessing you are running into other issues where Prism is not a
regular web browser.

> So I'm wondering if I could dedicate IPython Notebook to Prism web app

You could surely investigate, but I don't think we want to support
Prism, especially if it is not maintained any longer.

Cheers,

Brian

> Thanks
>
> _______________________________________________
> IPython-User mailing list
> [hidden email]
> http://mail.scipy.org/mailman/listinfo/ipython-user
>



--
Brian E. Granger
Cal Poly State University, San Luis Obispo
[hidden email] and [hidden email]
_______________________________________________
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: Notebook: console is not defined

klo uo
OK, thanks for your reply
I hope others jumps in and provides some tip, I could try

The thing is, I didn't yet noticed "web service" that doesn't work
with Prism, so I was a bit surprised/disappointed
js giant services as any Google services i.e. work without issues. MS
Live too... just can't think others to mention using advanced js
technologies

Sure I don't know what those js scripts does and perhaps my
expectations were too high

Cheers
_______________________________________________
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: Notebook: console is not defined

klo uo
Thanks for explanation. I had no idea about what websockets is, so I
googled and get rough picture

I commented "console" lines in notebook.js and managed to open saved
IPython notebook, but then dialog popped about missing websockets :D

I also tried https://github.com/mozilla/chromeless (Python wrapped)
with xulrunner 9, and when I opened IPython notebook and selected
saved notebook, I didn't get dialog about missing websockets, but just
blank page. From what I've read in the meantime seems like websockets
is included since Firefox 4, so xulrunner 9 most definitely should
have this feature, but I'm not sure if I'm talking apples and oranges.
I'll try later today again to see if I can get notebook running with
chromeless

My problem is old PC - 2GB, 3GHz P4 (which I can't upgrade soon) and
when I run notebook with pylab I get famous "heartbeat stopped -
kernel died" or similar message on startup (usually) and I looked for
other way to use this feature.
_______________________________________________
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: Notebook: console is not defined

Fernando Perez
In reply to this post by klo uo
On Tue, Jan 31, 2012 at 9:38 PM, klo uo <[hidden email]> wrote:
> The thing is, I didn't yet noticed "web service" that doesn't work
> with Prism, so I was a bit surprised/disappointed
> js giant services as any Google services i.e. work without issues. MS
> Live too... just can't think others to mention using advanced js
> technologies
>
> Sure I don't know what those js scripts does and perhaps my
> expectations were too high

The issue is that such tools are developed by large companies with
enormous development teams, that have the resources to build multiple
layers of complex fallbacks.  So even when they use modern features,
they have fallback solutions to work with older browsers.

We simply don't have the resources for that, and made the conscious,
explicit decision to target very new technologies that allow us to
develop what we need with our small team.  The price to pay is that
only very modern browsers are supported.

It was a deliberate but in our opinion reasonable tradeoff given our
circumstances.  Given that both Firefox and Chrome, which are freely
available on Linux, OSX and Windows work fine, this decision doesn't
really leave any significant population without an option for using
the notebook.

Best,

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: Notebook: console is not defined

Fernando Perez
In reply to this post by klo uo
On Wed, Feb 1, 2012 at 5:33 AM, klo uo <[hidden email]> wrote:
>
> My problem is old PC - 2GB, 3GHz P4 (which I can't upgrade soon) and
> when I run notebook with pylab I get famous "heartbeat stopped -
> kernel died" or similar message on startup (usually) and I looked for
> other way to use this feature.

It is possible to simply raise the heartbeat timeout with:

ipython notebook --MappingKernelManager.time_to_dead=10

which will make it 10 seconds.  Once you find the smallest value that
works reliably for you, you can put this permanently in your
configuration file.

Best,

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: Notebook: console is not defined

MinRK


On Wed, Feb 1, 2012 at 12:36, Fernando Perez <[hidden email]> wrote:
On Wed, Feb 1, 2012 at 5:33 AM, klo uo <[hidden email]> wrote:
>
> My problem is old PC - 2GB, 3GHz P4 (which I can't upgrade soon) and
> when I run notebook with pylab I get famous "heartbeat stopped -
> kernel died" or similar message on startup (usually) and I looked for
> other way to use this feature.

It is possible to simply raise the heartbeat timeout with:

ipython notebook --MappingKernelManager.time_to_dead=10

which will make it 10 seconds.  Once you find the smallest value that
works reliably for you, you can put this permanently in your
configuration file.

Yes, and if you are using master, the more relevant value to set is MappingKernelManager.first_beat.  I get along fine with a time_to_dead = 0.1, as long as the first beat is long enough to wait for process startup.

-MinRK


Best,

f
_______________________________________________
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: Notebook: console is not defined

klo uo
Thanks for those tips, I wasn't aware of such switch
It removes my problem, and as I use 0.12 I don't know if I should try
to decrease value suggested by Fernando. Is there some reason I should
try to find it's minimal value?

I wanted to inform also, that chromeless works: http://i.imgur.com/dspVE.png
...if direct link to saved notebook is passed to spartan web example
provided with chromeless, so I guess things can be tweaked further
_______________________________________________
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: Notebook: console is not defined

MinRK


On Wed, Feb 1, 2012 at 21:53, klo uo <[hidden email]> wrote:
Thanks for those tips, I wasn't aware of such switch
It removes my problem, and as I use 0.12 I don't know if I should try
to decrease value suggested by Fernando. Is there some reason I should
try to find it's minimal value?

The only reason to keep it short is to improve responsiveness when kernels die.  Since this is an infrequent event, 5-10 seconds is not so bad.  That said, in any normal situation, even one second should be *plenty* unless there are bugs in the heartbeat code (of which a few have been found in 0.12, and fixed in master).
 

I wanted to inform also, that chromeless works: http://i.imgur.com/dspVE.png
...if direct link to saved notebook is passed to spartan web example
provided with chromeless, so I guess things can be tweaked further
_______________________________________________
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: Notebook: console is not defined

klo uo
So there is reason you already suggested master version in my
scenario. Thanks Min

I'll download latest, and correct me if I'm wrong, I'll set
MappingKernelManager.first_beat=10
_______________________________________________
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: Notebook: console is not defined

Fernando Perez
On Wed, Feb 1, 2012 at 10:43 PM, klo uo <[hidden email]> wrote:
> I'll download latest, and correct me if I'm wrong, I'll set
> MappingKernelManager.first_beat=10

Yes, and then you can keep the time_to_dead small, which will give you
quicker detection of dead kernels.  Startup is what's slowest, so a
longer first_beat but a short time_to_dead should handle both slow
startup and nice, fast detection of dead kernels.

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: Notebook: console is not defined

klo uo
I'm little late with my upgrade, but just wanted to inform you that latest git version works great - qtconsole startup time is much faster and overall everything seems great w/o lags. I don't know why 0.12 wasn't performing good on my PC but current dev version seems to overcome all this

Keep up the good work :)

_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Loading...