Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Error when starting zipline with dockerfile - KeyError: 'allow_remote_access'

Hi,

I'm getting below error when trying to install zipline using docker:

~$ sudo docker run -v ~/zipline/notebooks:/projects -v ~/.zipline:/root/.zipline -p 8888:8888/tcp --name zipline -it quantopian/zipline Writing default config to: /root/.jupyter/jupyter_notebook_config.py
Generating a RSA private key
.....................................................................................+++++ .................................................................+++++

writing new private key to '/root/.jupyter/jupyter.key'

[I 18:03:56.430 NotebookApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret Traceback (most recent call last):
File "/usr/local/lib/python3.5/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 "/usr/local/lib/python3.5/site-packages/notebook/notebookapp.py", line 864, in _default_allow_remote
addr = ipaddress.ip_address(self.ip)
File "/usr/local/lib/python3.5/ipaddress.py", line 54, in ip_address
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 "/usr/local/bin/jupyter-notebook", line 10, in
sys.exit(main())
File "/usr/local/lib/python3.5/site-packages/jupyter_core/application.py", line 266, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/usr/local/lib/python3.5/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/usr/local/lib/python3.5/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python3.5/site-packages/notebook/notebookapp.py", line 1628, in initialize
self.init_webapp()
File "/usr/local/lib/python3.5/site-packages/notebook/notebookapp.py", line 1378, in init_webapp
self.jinja_environment_options,
File "/usr/local/lib/python3.5/site-packages/notebook/notebookapp.py", line 159, in init
default_url, settings_overrides, jinja_env_options)
File "/usr/local/lib/python3.5/site-packages/notebook/notebookapp.py", line 252, in init_settings
allow_remote_access=jupyter_app.allow_remote_access,
File "/usr/local/lib/python3.5/site-packages/traitlets/traitlets.py", line 556, in get
return self.get(obj, cls)
File "/usr/local/lib/python3.5/site-packages/traitlets/traitlets.py", line 535, in get
value = self._validate(obj, dynamic_default())
File "/usr/local/lib/python3.5/site-packages/notebook/notebookapp.py", line 867, in _default_allow_remote
for info in socket.getaddrinfo(self.ip, self.port, 0, socket.SOCK_STREAM):
File "/usr/local/lib/python3.5/socket.py", line 733, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

Can you please help?

Thanks,
Arik

1 response

fixed it by changing in docker_cmd.sh
--ip='*' -> --ip='0.0.0.0'