34

When I start the ipython server notebook using following command:

$ ipython notebook --profile=myserver

I get following screen which I don't recall seeing it before. It seems like a interactive screen where I move the curse and hit enter but I am not sure what I should be doing because I haven't seen this before and did an extensive google search and unable to find any detail information on what I need to select.

    IPython Dashboard
   IPython Notebook requires JavaScript.                                                                                                               
   Please enable it to proceed.                                                                                                                        

   IPython Notebook                                                                                                                                    

     * Notebooks                                                                                                                                       
     * Clusters                                                                                                                                        

   To import a notebook, drag the file onto the listing below or click here. ____________________                                                      
   (Submit) Refresh (Submit) New Notebook                                                                                                              
     * /                                                                                                                                               
     * rootHome /                                                                                                                                          
     * subdir /                                                                                                                                        
     * anotherSubdir /                                                                                                                                       

   IPython parallel computing clusters (Submit) Refresh                                                                                                
   profile status # of engines action                                                                                                                  



(Form submit button) Use right-arrow or <return> to submit ('x' for no cache).                                                                         
  Arrow keys: Up and Down to move.  Right to follow a link; Left to go back.                                                                           
 H)elp O)ptions P)rint G)o M)ain screen Q)uit /=search [delete]=history list   

I don't think I want to do import option...

add-semi-colons
  • 18,094
  • 55
  • 145
  • 232
  • It looks like it has launched a text-only web browser for you. It would normally open a modern browser like Firefox or Chrome to show the notebook dashboard. Is your `$BROWSER` environment variable set? Are you running this in an SSH session? – Thomas K Mar 13 '14 at 20:12

7 Answers7

25

As explained here: http://www.hydro.washington.edu/~jhamman/hydro-logic/blog/2013/10/04/pybook-remote/ launch with the --no-browser parameter like:

ipython notebook --no-browser
danielu
  • 261
  • 3
  • 2
5

This is what happens if e.g. your config file (ipython_notebook_config.py) is missing following entry:

c = get_config()
c.NotebookApp.open_browser = False
other options...

NotebookApp.open_browser defaults to True, which is why it tries to open a browser. Since I guess you are doing this in a terminal that has a text browser, it will not start javascript. Make sure that open_browser is set to False. Since it was working in the past, perhaps then somehow your config file got overridden?

If it is not the case, more details would be welcomed - your config file for instance.

Lukasz Tracewski
  • 10,794
  • 3
  • 34
  • 53
  • I use the following: c = get_config() c.NotebookApp.open_browser = False c.NotebookApp.certfile = u'/uni_cluster/home/myusername/mycert.pem' c.NotebookApp.password = u'sha1:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' c.NotebookApp.port = 9000 c.NotebookApp.ip = '*' c.IPKernelApp.pylab = 'inline' and I get the same thing. – qAp Sep 30 '14 at 08:28
  • this would be more useful if you also included the path to where the config file(s) are supposed to be. – szeitlin Oct 13 '15 at 17:58
  • 1
    @szeitlin: My path was `~/.ipython/profile_hlin117ipython_config.py`. To create a profile, type `ipython profile create [name]`. – hlin117 Nov 02 '15 at 23:07
1

I got the same message "IPython Notebook requires JavaScript ..." after performing the recommended modifications (Running a notebook server) in the ipython_notebook_config.py file. The problem was that I modified the ipython_notebook_config.py file in the default profile (/.ipython/profile_default/), instead of the one in the nbserver profile (/.ipython/profile_nbserver/). As a result, ipython notebook --profile=nbserver was not loading the right configuration...

leo9r
  • 2,037
  • 26
  • 30
1

I also got this issue, but mine was caused more indirectly. It was due to the Big Split, where IPython and Jupyter were separated. I got the issue both when running the deprecated ipython notebook --profile=my_profile and when running jupyter notebook --profile=my_profile.

The problem seems to be that the first (ipython) command seems to just use the second (jupyter) newer command. And the newer (jupyter) command doesn't load the notebook profile. That's because jupyter, unlike ipython, does not use profiles! My ipython profile originally included a config file which had a line to suppress launching the browser (since as others said above, I'm working in Linux so if the browser is unsuppressed, this would launch the text version of the browser), but this config file with the suppress browser line was never getting loaded (nor any of the other config settings, including the port number).

So the fix for me was to create a config file for jupyter, as discussed here, like:

jupyter notebook --generate-config

And then to make sure that the appropriate line was updated (as mentioned in another answer above):

c.NotebookApp.open_browser = False

More info on migrating from ipython to jupyter can be found here. It includes a command to migrate config files automatically, though that command did not seem to work for me.

Community
  • 1
  • 1
Blue Raspberry
  • 811
  • 7
  • 6
1

Sometimes if you get the problem IPython Notebook requires JavaScript ..." in your browser, you just need to enable JavaScript in Google Chrome. Here is how to do it: https://www.youtube.com/watch?v=Ooyw0EzZIfk

Nar
  • 11
  • 1
0

You are run the script in text mode. To see the browser launched, you need to run the script in GUI mode

James
  • 1
0

I ran into the same issue today. First, I disabled the browsing window, which led me to not see the javascript-related error. The notebook was still not showing in IE or Chrome at the designated local host and port combination though.

Revising this post, I saw that the author explicitly sets up port forwarding in their vagrant file, by changing guest=80 to guest=8888 (or, I assume, making them similar in case of another port). Doing so, followed by vagrant halt and vagrant reload resolved the issue for me.