Jupyter notebook KeyError: ‘allow_remote_access’

I remember this instruction :

jupyter notebook --generate-config echo “c.NotebookApp.ip = ‘*’”

where changed by notebook package in the past to be of type ‘localhost’ or a fixed IP number.

Probably more people using conda will at some point experience that error when updating packages to new versions.

Just update that key manually on file $HOME/.jupyter/jupyter_notebook_config.py

1- You can try to change c.NotebookApp.ip = ‘localhost’ and make sure that you /etc/hosts file points the name localhost to IP

2- Or you can try to change to c.NotebookApp.ip = ‘’


Thank you! Had the same problem, this fixed it.

1 Like

I have the same error – I uncommented and changed c.NotebookApp.ip to: c.NotebookApp.ip = ‘’

I still get this error:
(would the optional steps to install locally solve thie?)

Traceback (most recent call last):
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/traitlets/traitlets.py”, line 528, in get
value = obj._trait_values[self.name]
KeyError: ‘allow_remote_access’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/notebook/notebookapp.py”, line 869, in _default_allow_remote
addr = ipaddress.ip_address(self.ip)
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/ipaddress.py”, line 54, in ip_address
ValueError: ‘’ does not appear to be an IPv4 or IPv6 address

ValueError: ‘’ does not appear to be an IPv4 or IPv6 address

this means you don’t have a valid IP… you can try to use ‘’ or ‘localhost’ on your
c.NotebookApp.ip as I mentioned earlier.

this may be a noob observation, but the command:
jupyter notebook --generate-config echo “c.NotebookApp.ip = ‘*’”

should be changed to:
jupyter notebook --generate-config jupyter_notebook_config.py “c.NotebookApp.ip = ‘’”

it took me a moment to notice that if you use echo it means that the system is looking for a folder or file named echo. That was probably understood by most people reading this. After getting past that I am now getting a new problem:

(fastai) paperspace@psddgai82:~/.jupyter$ jupyter notebook
[I 18:58:29.865 NotebookApp] Writing notebook server cookie secret to /run/user/1000/jupyter/notebook_cookie_secret
[I 18:58:30.359 NotebookApp] Serving notebooks from local directory: /home/paperspace/.jupyter
[I 18:58:30.359 NotebookApp] The Jupyter Notebook is running at:
[I 18:58:30.359 NotebookApp] http://localhost:8888/?token=9d5a5aa6bd58f5e9
[I 18:58:30.359 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 18:58:30.359 NotebookApp] No web browser found: could not locate runnable browser.
[C 18:58:30.360 NotebookApp]

Copy/paste this URL into your browser when you connect for the first time,
to login with a token:

“this may be a noob observation, but the command:”

Are you following what I said earlier ? You just repeated what I said.


Your error is because you are in a “computer” that doesn’t have a browser installed and may be doesn’t have a GUI interface. By default if jupyter notebook is called in a computer that has GUI and a browser installed , it tries to open it asap the service it turned on. But if you in a isolated environment without any sharing GUI interface its a useless try and you can disable it.

Try this:

jupyter notebook --no-browser

Or you can hack into the jupyter_notebook_config.py to set the key:

c.NotebookApp.open_browser = False

Noting what worked for me, as a Paperspace user following the DL1 course’s setup stuff, with an ubuntu fast.ai template machine with GPU+:

$ jupyter notebook --generate-config ~/.jupyter/jupyter_notebook_config.py "c.NotebookApp.ip = ''"
Overwrite /home/paperspace/.jupyter/jupyter_notebook_config.py with default config? [y/N]y
Writing default config to: /home/paperspace/.jupyter/jupyter_notebook_config.py

Also: I couldn’t make it work by just manually editing the config file, and I didn’t have to specify “–no-browser” when launching jupyter notebok, Jupyter automatically accounted for that.

Hope that helps!

curious what was the link in the browser that worked for you?

I am running jupyter from paperspace:
juypter notebook worked great until I pulled for updates
Tried following fixes:
*created config file by running suggested command
*copied http://localhost:8888/?token=" " doesn’t work. changed localhost to same result.
last tried my given ip and same result
I tried editing config file with no success thus far. I might just try starting from scratch with a new machine.

Success running: jupyter notebook --ip=‘’

  1. copied link and entered paperspace id:
    http://enter paperspace ip here:8888/?token=f38212e3acd43d6d5353300a019d166f378f4d5ccb384ba1link

  2. run link in browser


@jjwurd I followed the suggested setup instructions: https://github.com/reshamas/fastai_deeplearn_part1/blob/master/tools/paperspace.md. Note that at the bottom, there’s a suggested ssh config that allows you to both open a terminal and also forward port 8888 from your local computer to the paperspace virtual computer by just running ssh paperspace. With this as an assumption, the link Jupyter says (with ‘localhost’ in it) will work as-is – because the service is actually tunneled in from the remote computer to your local one as if it was running on your computer.

The most useful comment. Thank you very much!

1 Like

I managed to fix the error and get access to my notebook remotely (without ssh tunnelling) by editing the config file at ~/.jupyter/jupyter_notebook_config.py with the following changes:

  • uncomment and set c.NotebookApp.ip = ''
  • uncomment and set c.NotebookApp.allow_remote_access = '*'

Thanks, it worked.

1 Like

Thank you Willismar,
I have been stuggling with this for a while. I did not understand an answer to a simuliar question but this post was very clear.

1 Like

Thanks, I set c.NotebookApp.allow_remote_access = True

1 Like

Thanks! This puzzle me a lot and causing issue in every environment since this config is not under conda env.

1 Like

Thanks all! I’m using paperspace and this worked for me thanks to the posts above.

1). Started from scratch by deleting fastai folder and followed install instructions at Fastai v0.7 install issues thread
2). Changed ~/.jupyter/jupyter_notebook_config.py file as mentioned by various people in this post i.e. uncomment and set c.NotebookApp.open_browser = False, uncomment and set c.NotebookApp.ip = ‘’, and uncomment and set c.NotebookApp.allow_remote_access =True
3). After launching jupyter notebook I inserted my ip before :888 i.e. http://[my_ip_here]:8888


Many thanks - a combination of this and the thread you pointed too has got me there.

Thanks! This thread helped, and this command worked for me:

Jupyter notebook --‘’ --no-browser

1 Like

Thank you. Option 2 worked for me.