NotebookApp configuration error

1,058 views
Skip to first unread message

Pasle Choix

unread,
Dec 12, 2017, 3:33:45 PM12/12/17
to Project Jupyter
I installed Anaconda2 and followed this doc: http://jupyter-notebook.readthedocs.io/en/stable/config_overview.html generated jupyter_notebook_config.py

all the settings remain unchanged except for two:
NotebookApp.ip = '*'
NotebookApp.port = 8880


When I started notebook:
./jupyter notebook --port 8880
I received error:

File 'jupyter_notebook_config.py', line 167, in <module>
NotebookApp.ip = '*'
NameError: name 'NotebookApp' is not defined

Can anyone help to sort it out?

Thank you very much.


Thomas Kluyver

unread,
Dec 12, 2017, 4:58:03 PM12/12/17
to Project Jupyter
In the Python config file, names should start with c. - like c.NotebookApp.ip . You should be able to find this already in the generated config file and uncomment it.

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/def15c5d-e740-4ba8-aebb-886a1ff5d6d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pasle Choix

unread,
Dec 12, 2017, 5:08:55 PM12/12/17
to Project Jupyter
It's already uncommented. so as the .port


On Tuesday, December 12, 2017 at 4:58:03 PM UTC-5, takowl wrote:
In the Python config file, names should start with c. - like c.NotebookApp.ip . You should be able to find this already in the generated config file and uncomment it.
On 12 December 2017 at 20:33, Pasle Choix <xie32...@gmail.com> wrote:
I installed Anaconda2 and followed this doc: http://jupyter-notebook.readthedocs.io/en/stable/config_overview.html generated jupyter_notebook_config.py

all the settings remain unchanged except for two:
NotebookApp.ip = '*'
NotebookApp.port = 8880


When I started notebook:
./jupyter notebook --port 8880
I received error:

File 'jupyter_notebook_config.py', line 167, in <module>
NotebookApp.ip = '*'
NameError: name 'NotebookApp' is not defined

Can anyone help to sort it out?

Thank you very much.


--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.

Pasle Choix

unread,
Dec 12, 2017, 6:03:40 PM12/12/17
to Project Jupyter
Yes, originally it was c.NotebookApp.ip


As you can see from the screen, it prompts an error. 

Whether it is with c. or no c., the error stays there the same.

This is really odd. Anything missing here?

Thank you.



On Tuesday, December 12, 2017 at 4:58:03 PM UTC-5, takowl wrote:
In the Python config file, names should start with c. - like c.NotebookApp.ip . You should be able to find this already in the generated config file and uncomment it.
On 12 December 2017 at 20:33, Pasle Choix <xie32...@gmail.com> wrote:
I installed Anaconda2 and followed this doc: http://jupyter-notebook.readthedocs.io/en/stable/config_overview.html generated jupyter_notebook_config.py

all the settings remain unchanged except for two:
NotebookApp.ip = '*'
NotebookApp.port = 8880


When I started notebook:
./jupyter notebook --port 8880
I received error:

File 'jupyter_notebook_config.py', line 167, in <module>
NotebookApp.ip = '*'
NameError: name 'NotebookApp' is not defined

Can anyone help to sort it out?

Thank you very much.


--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.

Roland Weber

unread,
Dec 13, 2017, 1:39:33 AM12/13/17
to Project Jupyter
If your editor shows 'c.NotebookApp.ip', but the error message is about 'NotebookApp.ip', then you're editing the wrong file (or you forgot to save the change, which has happened to me occasionally ;-). Maybe you installed Jupyter in multiple environments, or you copied the configuration file to multiple locations?

Try "jupyter --paths" to see where the configuration is expected.

hope that helps,
  Roland

Thomas Kluyver

unread,
Dec 13, 2017, 5:51:45 AM12/13/17
to Project Jupyter
Or it might be pointing to another bit of the same file. The error message points to line 167 - check that line in your editor.

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.

To post to this group, send email to jup...@googlegroups.com.

pasle...@gmail.com

unread,
Dec 13, 2017, 10:22:30 AM12/13/17
to Project Jupyter
Don't know why this google group doesn't allow me to post at the end now, anyway, hopefully you notice my post:

I read your (@takowl and @Roland Weber) points and that could be the reason since I am actually doing this on a cluster which consists of 15 nodes.

However, I still do not understand:
1. I opened a session1 and edited the jupyter_notebook_config.py accordingly;
2. I started the jupyter service on another session2 and there it prompted error I posted here;

Both the two sessions are on the same host.

Now I changed my testing:
I opened session 1 and confirmed the editting
I started the jupyter service on the SAME session
I tested from session 2 and it works! I tested from workstation browser and it works!

However, new issue follows right after this:

it takes me to: http://myhostname:8880/tree#notebooks, the notebook GUI is displayed

When I click on any item under the New menu on the right top, I get error of permission denied.

So what am I missing here? we do have Sentry in place, how do I set up the right access?

Thank you.

Matthias Bussonnier

unread,
Dec 13, 2017, 10:31:39 AM12/13/17
to jup...@googlegroups.com
> When I click on any item under the New menu on the right top, I get error of permission denied.

In the terminal where you started the notebook you should get logs with more informations about the permission denied, likely a stacktrace with an error code.
There are many reasons why you could have permission denied:
- Folder where you tried to create a notebook is read-only
- Folder where you tried to create a notebook does not belong to the right user
- Folder where you tried to create a notebook is a system or hidden folder

I'm not familiar with Sentry so I can't give advice with it.
--
Matthias

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.

pasle...@gmail.com

unread,
Dec 13, 2017, 11:39:29 AM12/13/17
to Project Jupyter
I have sorted it out, I was running the notebook service in a folder that requires root, after I started it from another folder that open read/write, I am fine now.

BUT this expose a bigger issue here:

Doesn't Jupyter come with security control? what if I want to set my work folder visible to only myself, or set the team folder to only team members? Can Jupyter integrate with LDAP?

Thanks.


On Tuesday, December 12, 2017 at 3:33:45 PM UTC-5, Pasle Choix wrote:

Thomas Kluyver

unread,
Dec 13, 2017, 11:47:52 AM12/13/17
to Project Jupyter
The security model in the notebook is that you run it and you access it - Jupyter gives you access to the same files that your user can already access on the machine.

If you want authentication for different users, look at JupyterHub: http://jupyterhub.readthedocs.io/en/latest/

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages