[Python-modules-team] Bug#893360: python3-tornado 5.0.0 breaks python3-zmq

Rebecca N. Palmer rebecca_palmer at zoho.com
Sun Mar 18 20:25:51 UTC 2018


This is because tornado 5.0 deliberately removed 
ioloop.IOLoop.initialized() because "It is no longer possible to provide 
this method with reasonable semantics": 
https://github.com/tornadoweb/tornado/commit/426b3812b9dd21ae0bac19d4146c6952816c7bfe#diff-1d4144f0ef561b7c18c7fe438816e1f5

This bug probably doesn't affect pyzmq 17 (since
https://github.com/zeromq/pyzmq/commit/f24a264094c6aae2587279c052fcbe242dd9d157#diff-079289d3903c2adcc75b3beb3458a2cf 
), but I don't know whether upgrading Debian's pyzmq to that would break 
anything else.

Another option is to remove this assert() (zmq/eventloop/ioloop.py:210) 
or move it inside a tornado_version check.

It is likely that both Python 2 and 3 are affected, but I have not tried 
to verify this.  At least Jupyter/ipykernel (via 
python3-jupyter-client), sagemath, circus and salt-{master,minion} 
Depend: on both python(3)-tornado and python(3)-zmq, but I have only 
tested the first.

Stack trace (this input file is 
https://salsa.debian.org/science-team/theano/blob/master/doc/library/d3viz/index.ipynb 
, but any .ipynb file would probably do):

# apt-get install jupyter-nbconvert python3-ipykernel
$ jupyter-nbconvert --to notebook --execute --allow-errors index.ipynb
[NbConvertApp] Converting notebook index.ipynb to notebook
[NbConvertApp] Executing notebook with kernel: python3
Traceback (most recent call last):
   File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
     "__main__", mod_spec)
   File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
     exec(code, run_globals)
   File "/usr/lib/python3/dist-packages/ipykernel_launcher.py", line 16, 
in <module>
     app.launch_new_instance()
   File 
"/usr/lib/python3/dist-packages/traitlets/config/application.py", line 
657, in launch_instance
     app.initialize(argv)
   File "<decorator-gen-121>", line 2, in initialize
   File 
"/usr/lib/python3/dist-packages/traitlets/config/application.py", line 
87, in catch_config_error
     return method(app, *args, **kwargs)
   File "/usr/lib/python3/dist-packages/ipykernel/kernelapp.py", line 
452, in initialize
     zmq_ioloop.install()
   File "/usr/lib/python3/dist-packages/zmq/eventloop/ioloop.py", line 
210, in install
     assert (not ioloop.IOLoop.initialized()) or \
AttributeError: type object 'IOLoop' has no attribute 'initialized'
Traceback (most recent call last):
   File "/usr/bin/jupyter-nbconvert", line 11, in <module>
     load_entry_point('nbconvert==5.3.1', 'console_scripts', 
'jupyter-nbconvert')()
   File "/usr/lib/python3/dist-packages/jupyter_core/application.py", 
line 266, in launch_instance
     return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
   File 
"/usr/lib/python3/dist-packages/traitlets/config/application.py", line 
658, in launch_instance
     app.start()
   File "/usr/lib/python3/dist-packages/nbconvert/nbconvertapp.py", line 
325, in start
     self.convert_notebooks()
   File "/usr/lib/python3/dist-packages/nbconvert/nbconvertapp.py", line 
493, in convert_notebooks
     self.convert_single_notebook(notebook_filename)
   File "/usr/lib/python3/dist-packages/nbconvert/nbconvertapp.py", line 
464, in convert_single_notebook
     output, resources = self.export_single_notebook(notebook_filename, 
resources, input_buffer=input_buffer)
   File "/usr/lib/python3/dist-packages/nbconvert/nbconvertapp.py", line 
393, in export_single_notebook
     output, resources = self.exporter.from_filename(notebook_filename, 
resources=resources)
   File 
"/usr/lib/python3/dist-packages/nbconvert/exporters/exporter.py", line 
174, in from_filename
     return self.from_file(f, resources=resources, **kw)
   File 
"/usr/lib/python3/dist-packages/nbconvert/exporters/exporter.py", line 
192, in from_file
     return self.from_notebook_node(nbformat.read(file_stream, 
as_version=4), resources=resources, **kw)
   File 
"/usr/lib/python3/dist-packages/nbconvert/exporters/notebook.py", line 
31, in from_notebook_node
     nb_copy, resources = super(NotebookExporter, 
self).from_notebook_node(nb, resources, **kw)
   File 
"/usr/lib/python3/dist-packages/nbconvert/exporters/exporter.py", line 
134, in from_notebook_node
     nb_copy, resources = self._preprocess(nb_copy, resources)
   File 
"/usr/lib/python3/dist-packages/nbconvert/exporters/exporter.py", line 
311, in _preprocess
     nbc, resc = preprocessor(nbc, resc)
   File 
"/usr/lib/python3/dist-packages/nbconvert/preprocessors/base.py", line 
47, in __call__
     return self.preprocess(nb, resources)
   File 
"/usr/lib/python3/dist-packages/nbconvert/preprocessors/execute.py", 
line 257, in preprocess
     cwd=path)
   File 
"/usr/lib/python3/dist-packages/nbconvert/preprocessors/execute.py", 
line 241, in start_new_kernel
     kc.wait_for_ready(timeout=startup_timeout)
   File 
"/usr/lib/python3/dist-packages/jupyter_client/blocking/client.py", line 
120, in wait_for_ready
     raise RuntimeError('Kernel died before replying to kernel_info')
RuntimeError: Kernel died before replying to kernel_info
$



More information about the Python-modules-team mailing list