DavidLeoni / softpython-it

Libro introduttivo per programmare e analizzare dati con Python 3
http://it.softpython.org
Other
9 stars 3 forks source link

Can't execute notebooks in ReadTheDocs (Address already in use) #2

Open DavidLeoni opened 7 years ago

DavidLeoni commented 7 years ago

When building, I randomly get zmq.error.ZMQError: Address already in use as soon as ipykernel is needed.

Current workaround: for safety just disabled execution setting in conf.py :

nbsphinx_execute = 'never' 
Running Sphinx v1.5.3
making output directory...
Couldn't find git tag, defaulting to: 0.1.0
loading translations [en]... done
loading pickled environment... not yet created
loading intersphinx inventory from https://docs.python.org/objects.inv...
intersphinx inventory has moved: https://docs.python.org/objects.inv -> https://docs.python.org/2/objects.inv
building [mo]: targets for 0 po files that are out of date
building [latex]: all documents
updating environment: 6 added, 0 changed, 0 removed
reading sources... [ 16%] README
reading sources... [ 33%] index
reading sources... [ 50%] instructor/index
reading sources... [ 66%] instructor/setup
Traceback (most recent call last):
  File "/home/docs/.pyenv/versions/3.5.2/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/docs/.pyenv/versions/3.5.2/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/docs/checkouts/readthedocs.org/user_builds/soft-python/envs/latest/lib/python3.5/site-packages/ipykernel_launcher.py", line 16, in <module>
    app.launch_new_instance()
  File "/home/docs/checkouts/readthedocs.org/user_builds/soft-python/envs/latest/lib/python3.5/site-packages/traitlets/config/application.py", line 657, in launch_instance
    app.initialize(argv)
  File "<decorator-gen-123>", line 2, in initialize
  File "/home/docs/checkouts/readthedocs.org/user_builds/soft-python/envs/latest/lib/python3.5/site-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/home/docs/checkouts/readthedocs.org/user_builds/soft-python/envs/latest/lib/python3.5/site-packages/ipykernel/kernelapp.py", line 448, in initialize
    self.init_sockets()
  File "/home/docs/checkouts/readthedocs.org/user_builds/soft-python/envs/latest/lib/python3.5/site-packages/ipykernel/kernelapp.py", line 251, in init_sockets
    self.init_iopub(context)
  File "/home/docs/checkouts/readthedocs.org/user_builds/soft-python/envs/latest/lib/python3.5/site-packages/ipykernel/kernelapp.py", line 256, in init_iopub
    self.iopub_port = self._bind_socket(self.iopub_socket, self.iopub_port)
  File "/home/docs/checkouts/readthedocs.org/user_builds/soft-python/envs/latest/lib/python3.5/site-packages/ipykernel/kernelapp.py", line 180, in _bind_socket
    s.bind("tcp://%s:%i" % (self.ip, port))
  File "zmq/backend/cython/socket.pyx", line 495, in zmq.backend.cython.socket.Socket.bind (zmq/backend/cython/socket.c:5653)
  File "zmq/backend/cython/checkrc.pxd", line 25, in zmq.backend.cython.checkrc._check_rc (zmq/backend/cython/socket.c:10014)
zmq.error.ZMQError: Address already in use

Notebook error:
RuntimeError in instructor/setup.ipynb:
Kernel died before replying to kernel_info