Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI failures with tornado 6.0a1 #4311

Closed
takluyver opened this issue Jan 2, 2019 · 21 comments
Closed

CI failures with tornado 6.0a1 #4311

takluyver opened this issue Jan 2, 2019 · 21 comments

Comments

@takluyver
Copy link
Member

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
@takluyver
Copy link
Member Author

I opened an issue on pip to request the ability to install betas but not alphas: pypa/pip#6110

@takluyver
Copy link
Member Author

takluyver commented Jan 2, 2019

The first traceback there is a failure importing nbconvert; I've made PR jupyter/nbconvert#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.

@liavkoren
Copy link

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

@cguethle
Copy link

cguethle commented Mar 1, 2019

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

@danking
Copy link

danking commented Mar 1, 2019

Also appears to be affecting us.

@danking
Copy link

danking commented Mar 1, 2019

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

@spex66
Copy link

spex66 commented Mar 4, 2019

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

@Tantael
Copy link

Tantael commented Mar 4, 2019

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

@amadeann
Copy link

amadeann commented Mar 4, 2019

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

@edgarriba
Copy link

same error here 😭

@lkhphuc
Copy link

lkhphuc commented Mar 6, 2019

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.

@Zhaoxian-Wu
Copy link

Zhaoxian-Wu commented Mar 6, 2019

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.

@Clobbe
Copy link

Clobbe commented Mar 6, 2019

Thx @spex66, this solved my issue as well! 🙌 🚀 🥳

@minrk
Copy link
Member

minrk commented Mar 6, 2019

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

@minrk minrk closed this as completed Mar 6, 2019
@minrk minrk added this to the Not Notebook milestone Mar 6, 2019
@edgarriba
Copy link

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

@minrk
Copy link
Member

minrk commented Mar 6, 2019

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

hunse added a commit to nengo/nengo-loihi that referenced this issue Mar 6, 2019
- `scp` no longer allows the `.` path as the source, so we use
  `$(pwd)` instead.
  https://superuser.com/questions/1403473/scp-error-unexpected-filename
- Newer tornado does not work with older nbconvert, so we're using
  new nbconvert now.
  jupyter/notebook#4311
ageorgou added a commit to ageorgou/binder_sample_repo that referenced this issue Mar 12, 2019
This is a problem with the nbconvert/notebook and tornado packages
which was causing the Jupyter server to fail. Updating to the most
recent versions should fix this. See below for more details:
jupyter/notebook#4311
@ibabeo
Copy link

ibabeo commented Mar 14, 2019

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

@swiss-knight
Copy link

Same issue with tornado 6.0.2.

@mdv3101
Copy link

mdv3101 commented Apr 3, 2019

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

@aysark
Copy link

aysark commented Apr 11, 2019

Just ran into this issue after upgrading 😐

jan-janssen added a commit to pyiron/pyiron_base that referenced this issue Sep 9, 2020
jan-janssen added a commit to pyiron/pyiron_base that referenced this issue Sep 9, 2020
jan-janssen added a commit to pyiron/pyiron_base that referenced this issue Sep 9, 2020
@liavkoren
Copy link

I just ran into this issue again, with fresh installs of jupyter with both pip and conda. The conda stacktraces were:

 Uncaught exception GET /notebooks/Untitled6.ipynb?kernel_name=python3 (127.0.0.1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/notebooks/Untitled6.ipynb?kernel_name=python3', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/Users/liavkoren/anaconda3/envs/dnd-sci/lib/python3.8/site-packages/tornado/web.py", line 1704, in _execute
        result = await result
      File "/Users/liavkoren/anaconda3/envs/dnd-sci/lib/python3.8/site-packages/tornado/gen.py", line 775, in run
        yielded = self.gen.send(value)
      File "/Users/liavkoren/anaconda3/envs/dnd-sci/lib/python3.8/site-packages/notebook/notebook/handlers.py", line 95, in get
        self.write(self.render_template('notebook.html',
      File "/Users/liavkoren/anaconda3/envs/dnd-sci/lib/python3.8/site-packages/notebook/base/handlers.py", line 516, in render_template
        return template.render(**ns)
      File "/Users/liavkoren/anaconda3/envs/dnd-sci/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
        self.environment.handle_exception()
      File "/Users/liavkoren/anaconda3/envs/dnd-sci/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
        reraise(*rewrite_traceback_stack(source=source))
      File "/Users/liavkoren/anaconda3/envs/dnd-sci/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
        raise value.with_traceback(tb)
      File "/Users/liavkoren/anaconda3/envs/dnd-sci/lib/python3.8/site-packages/notebook/templates/notebook.html", line 1, in top-level template code
        {% extends "page.html" %}
      File "/Users/liavkoren/anaconda3/envs/dnd-sci/lib/python3.8/site-packages/notebook/templates/page.html", line 154, in top-level template code
        {% block header %}
      File "/Users/liavkoren/anaconda3/envs/dnd-sci/lib/python3.8/site-packages/notebook/templates/notebook.html", line 115, in block "header"
        {% for exporter in get_frontend_exporters() %}
      File "/Users/liavkoren/anaconda3/envs/dnd-sci/lib/python3.8/site-packages/notebook/notebook/handlers.py", line 40, in get_frontend_exporters
        for name in get_export_names():
      File "/Users/liavkoren/anaconda3/envs/dnd-sci/lib/python3.8/site-packages/nbconvert/exporters/base.py", line 141, in get_export_names
        e = get_exporter(exporter_name)(config=config)
      File "/Users/liavkoren/anaconda3/envs/dnd-sci/lib/python3.8/site-packages/nbconvert/exporters/base.py", line 102, in get_exporter
        if getattr(exporter(config=config), 'enabled', True):
      File "/Users/liavkoren/anaconda3/envs/dnd-sci/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 325, in __init__
        super().__init__(config=config, **kw)
      File "/Users/liavkoren/anaconda3/envs/dnd-sci/lib/python3.8/site-packages/nbconvert/exporters/exporter.py", line 114, in __init__
        self._init_preprocessors()
      File "/Users/liavkoren/anaconda3/envs/dnd-sci/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 491, in _init_preprocessors
        conf = self._get_conf()
      File "/Users/liavkoren/anaconda3/envs/dnd-sci/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 509, in _get_conf
        if conf_path.exists():
      File "/Users/liavkoren/anaconda3/envs/dnd-sci/lib/python3.8/pathlib.py", line 1400, in exists
        self.stat()
      File "/Users/liavkoren/anaconda3/envs/dnd-sci/lib/python3.8/pathlib.py", line 1197, in stat
        return self._accessor.stat(self)
    PermissionError: [Errno 13] Permission denied: '/usr/local/share/jupyter/nbconvert/templates/latex/conf.json'

Which was fixed by chowning /usr/local/share/jupyter/nbconvert/.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests