Notebook: CI failures with tornado 6.0a1

Created on 2 Jan 2019  路  20Comments  路  Source: jupyter/notebook

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

Most helpful comment

@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.

All 20 comments

I opened an issue on pip to request the ability to install betas but not alphas: https://github.com/pypa/pip/issues/6110

The first traceback there is a failure importing nbconvert; I've made PR https://github.com/jupyter/nbconvert/pull/937 to fix that. No idea about the "Non-websocket response" at the moment.

It's probably sensible to constrain tornado<6 for a while, as I've done in #4310.

I just ran into this issue, should I install of master or do you guys expect to cut a release soon?
(Also, thank you for the time and attention you guys put into this package. : )

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

Also appears to be affecting us.

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

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 :)

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

The solution from @spex66 worked from me as well. Thanks!

same error here :sob:

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.

I try the solution from @spex66 , but it seems not to work in my machine,

Solving environment: failed

UnsatisfiableError: The following specifications were found to be in conflict:
  - spyder-kernels
  - tornado[version='<6']
Use "conda info <package>" to see the dependencies for each package.

Thx @spex66, this solved my issue as well! 馃檶 馃殌 馃コ

The first issue is fixed by nbconvert 5.4.1, the second by notebook 5.7.5

in my case, I solved it by specifying to conda to install tornado<6.
@minrk when are you planning to fix this ?

@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.

@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..

Same issue with tornado 6.0.2.

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

Just ran into this issue after upgrading 馃槓

Was this page helpful?
0 / 5 - 0 ratings