notebook: CI failures with tornado 6.0a1

Tornado 6.0a1 was just released, and is being picked up by Travis CI because we use the --pre option to install dependencies. This causes a couple of test failures.

We could drop the --pre flag and continue testing with Tornado 5.x for now. But it’s useful to pick up problems when dependencies are in beta or RC.

Tracebacks:

Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/tornado/web.py", line 1697, in _execute
    result = method(*self.path_args, **self.path_kwargs)
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/tornado/web.py", line 3174, in wrapper
    return method(self, *args, **kwargs)
  File "/home/travis/build/jupyter/notebook/notebook/nbconvert/handlers.py", line 91, in get
    exporter = get_exporter(format, config=self.config, log=self.log)
  File "/home/travis/build/jupyter/notebook/notebook/nbconvert/handlers.py", line 61, in get_exporter
    from nbconvert.exporters.base import get_exporter
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/nbconvert/__init__.py", line 7, in <module>
    from . import postprocessors
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/nbconvert/postprocessors/__init__.py", line 5, in <module>
    from .serve import ServePostProcessor
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/nbconvert/postprocessors/serve.py", line 19, in <module>
    class ProxyHandler(web.RequestHandler):
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/nbconvert/postprocessors/serve.py", line 21, in ProxyHandler
    @web.asynchronous
AttributeError: module 'tornado.web' has no attribute 'asynchronous'

...

Traceback (most recent call last):
  File "/home/travis/build/jupyter/notebook/notebook/services/kernels/tests/test_kernels_api.py", line 176, in test_connections
    ws = self.kern_api.websocket(kid)
  File "/home/travis/build/jupyter/notebook/notebook/services/kernels/tests/test_kernels_api.py", line 65, in websocket
    return loop.run_sync(lambda : f)
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/tornado/ioloop.py", line 531, in run_sync
    return future_cell[0].result()
tornado.websocket.WebSocketError: Non-websocket response

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 21 (4 by maintainers)

Commits related to this issue

Most upvoted comments

@edgarriba it’s already fixed. nbconvert 5.4.1 was out with a fix for web.asynchronous a month ago, while notebook 5.7.5 finished up its own tornado 6 compatibility fixes today.

If you’re using conda:

conda install nbconvert notebook

should work with tornado 6. Otherwise, pip install --upgrade nbconvert notebook should do the same.

tornado 6.0 dropped today and broke our stuff with this issue. Seems this was not resolved prior to release.

I was not able to run the newest version install with conda install jupyterlab. After that I downgrade tornado using conda install tornado=5.1.1 and it was good to go.

Since it is atm only in master, here is how I limited tornado to <6 until the fix is deployed to conda packages.

Warning: I’m a conda noob and googled this stuff, but it worked for me. (i.e. I still don’t know where conda saved this environment change to)

I created one yml file:

name: base
dependencies:
   - tornado<6

And updated conda base (aka root) environment with it like so:

conda env update -f 190304-root-env-patch-tornado.yml

thx to SO post:

Now I need to remember, when this is fixed in conda and to remove this patch again 😃

Stop ruining and wasting time of others… This issue is still pending and creating a havoc for others.

@lkhphuc Thanks. It saved my day! btw I first pip downgrade tornado it didn’t work, then I conda downgrade tornado, it worked. For someone completely new, this info might help…

@takluyver Looks like jupyter just needs to publish to PyPI. #4310 wasn’t included in the last publish on December 17, 2018.

Same issue with tornado 6.0.2.

That why you should never use undefined package version on your production 😄

Also appears to be affecting us.