Error while trying to open Jupyter notebook in Paperspace

I am using Ubuntu 16.04 machine in Paperspace. I followed the for setting up Paperspace. Jupyter notebook was running ok till yesterday.

Today when i try opening Jupyter notebook i’m getting the following error -

Writing notebook server cookie secret to /run/user/1000/jupyter/notebook_cookie_secret
Traceback (most recent call last):
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/traitlets/”, line 528, in get
value = obj._trait_values[]
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/”, line 869, in _default_allow_remote
addr = ipaddress.ip_address(self.ip)
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/”, line 54, in ip_address
ValueError: ‘’ does not appear to be an IPv4 or IPv6 address

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/paperspace/anaconda3/envs/fastai/bin/jupyter-notebook”, line 11, in
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/jupyter_core/”, line 266, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/traitlets/config/”, line 657, in launch_instance
File “”, line 2, in initialize
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/traitlets/config/”, line 87, in catch_config_error
return method(app, *args, **kwargs)
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/notebook/”, line 1629, in initialize
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/notebook/”, line 1379, in init_webapp
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/notebook/”, line 158, in init
default_url, settings_overrides, jinja_env_options)
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/notebook/”, line 251, in init_settings
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/traitlets/”, line 556, in get
return self.get(obj, cls)
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/traitlets/”, line 535, in get
value = self._validate(obj, dynamic_default())
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/site-packages/notebook/”, line 872, in _default_allow_remote
for info in socket.getaddrinfo(self.ip, self.port, 0, socket.SOCK_STREAM):
File “/home/paperspace/anaconda3/envs/fastai/lib/python3.6/”, line 745, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known.

Any help would be appreciated.



I got the same issue after updating the conda env ( $ conda env update ).

My quick fix was:

  1. Go to ~/.jupyter
  2. There should be a config file “”
  3. When it’s not existing, generate it: jupyter notebook --generate-config (in case it’s the correct location)
  4. Add this line e.g. at the end:
    c.NotebookApp.allow_remote_access = False

Info: You might want to change the parameter setting. I’m connecting like this to my paperspace instance: ssh paperspace@ -L 8888:localhost:8888
So I can access the jupyter notebook like http://localhost:8888/



Thanks Erik. I have updated the "”. However i get a Forbidden error when i try connecting to the jupyter notebook.

This is what i get -
jupyter notebook
[I 11:59:31.396 NotebookApp] Writing notebook server cookie secret to /run/user/1000/jupyter/notebook_cookie_secret
[W 11:59:32.166 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[I 11:59:32.416 NotebookApp] [jupyter_nbextensions_configurator] enabled 0.4.0
[I 11:59:32.417 NotebookApp] Serving notebooks from local directory: /home/paperspace/fastai
[I 11:59:32.417 NotebookApp] The Jupyter Notebook is running at:
[I 11:59:32.417 NotebookApp] http://(ps4wq2i1c or
[I 11:59:32.417 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 11:59:32.417 NotebookApp]

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

However when i try to connect http://(ps4wq2i1c or
( I have replaced the ((ps4wq2i1c or with my ip.) I get

403 Forbidden error.

I noticed - Blocking request with non-local ‘Host’ ( If the notebook should be accessible at that name, set NotebookApp.allow_remote_access to disable the check. when i try connecting to jupyter notebook.

Any help would be appreciated.Thanks

An update-

I fixed the error -

I updated “” wiht the lines

And it is working fine.

Thanks for the help


This happened to me after updating my environment. Got it working again thanks to these posts. Here’s a one line fix:

echo 'c.NotebookApp.allow_remote_access = True' >> ~/.jupyter/

Any idea why this suddenly started happening?


I had the same issue as well two days ago. Support did not get back to me in time. Thank you for this help so I don’t get stuck too. Much appreciated.

Ok, now whenever I add my local IP address either way (hostname or public IP) Safari cannot find the server. What am I missing? I am running my machine through the ‘Fastai-MOOC’, if that makes any difference.

The same thing happened to me tonight as well with a new Paperspace machine. I updated from the fastai repo and then updated conda. The single line fix above allowed me to start Jupyter Notebook, but the paperspace machine seems very unstable. It locked up once on me, and now I keep losing the connection to the kernel from my local browser and am not able to reconnect.

I have issues with Paperspace as well. It is very slow. I have started using Colab and it slow too but not as bad as Paperspace.

At this point, I cannot recommend paperspace. I’ve spent more time trying to get the machine to restart, only to have it lock up again, than I spent actually trying to work through the lessons in the first notebook.

Thank you. I experienced the same problems and this is the solution that worked for me.

I followed the instruction in until Part IV, step 2.5, but now get stuck. I get the following error: Config option allow_remote_access not recognized by NotebookApp

What should I do? Thanks!

I’ve been stuck on this same problem for weeks too, did you find an answer to it yet?


I am using GCP and Colab. I no longer use Paperspace.


I suggest to follow these steps (as these worked for me):

  1. Execute following command in directory /home/paperspace/fastai
    jupyter notebook --generate-config

  2. Then open the file (/home/paperspace/.jupyter/ using vim:

  3. Go to the end of this file and these lines (as shared by @Bhuvana_ka):

  4. If you do not know vim commands then go to this page for help:

  5. After saving and closing ‘’ , go to /fastai directory and run this:
    jupyter notebook

It should work now!


Thus worked for me. Thank you.

Thank you, it worked for me.