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

workaround tornado py38 compatibility issue #5047

Merged
merged 2 commits into from
Nov 24, 2019

Conversation

minrk
Copy link
Member

@minrk minrk commented Nov 12, 2019

by setting the pre-3.8 eventloop policy as default

closes #4613

Workaround for existing releases is to add the same event policy line to your jupyter_notebook_config.py. I haven't tested, but am pretty sure it's loaded early enough:

import sys

if sys.platform == 'win32':
    import asyncio
    asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())

by setting the pre-3.8 eventloop policy as default
@bollwyvl
Copy link
Contributor

I think launchnotebook.py will also need the patch... more thoughts here

@asmca
Copy link

asmca commented Nov 26, 2019

yes this patch works for me.
python3.8.0 on win7.

Name: jupyter Version: 1.0.0
Name: notebook Version: 6.0.2
Name: jupyter-core Version: 4.6.1

@scottwsides
Copy link

'jupyter notebook stop 8888' is not working on mac as well (for python 3.7.6)

Error is similar to others

File "/Users/swsides/chemistream/bin/jupyter-notebook", line 11, in
sys.exit(main())
File "/Users/swsides/chemistream/lib/python3.7/site-packages/jupyter_core/application.py", line 268, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/Users/swsides/chemistream/lib/python3.7/site-packages/traitlets/config/application.py", line 664, in launch_instance
app.start()
File "/Users/swsides/chemistream/lib/python3.7/site-packages/notebook/notebookapp.py", line 1910, in start
super(NotebookApp, self).start()
File "/Users/swsides/chemistream/lib/python3.7/site-packages/jupyter_core/application.py", line 257, in start
self.subapp.start()
File "/Users/swsides/chemistream/lib/python3.7/site-packages/notebook/notebookapp.py", line 466, in start
if not self.shutdown_server(server):
File "/Users/swsides/chemistream/lib/python3.7/site-packages/notebook/notebookapp.py", line 457, in shutdown_server
return shutdown_server(server, log=self.log)
File "/Users/swsides/chemistream/lib/python3.7/site-packages/notebook/notebookapp.py", line 417, in shutdown_server
HTTPClient().fetch(req)
File "/Users/swsides/chemistream/lib/python3.7/site-packages/tornado/httpclient.py", line 133, in fetch
functools.partial(self._async_client.fetch, request, **kwargs)
File "/Users/swsides/chemistream/lib/python3.7/site-packages/tornado/ioloop.py", line 532, in run_sync
return future_cell[0].result()
tornado.httpclient.HTTPClientError: HTTP 403: Forbidden

@kevin-bates
Copy link
Member

@scottwsides - your traceback is unrelated to the py38 compatbility issue. That issue only occurs on Windows platforms with Python 3.8.

Could you please open a new issue with this information? Please also indicate if you're using a token as the authentication mechanism or a password. Thanks.

JoelPasvolsky added a commit to JoelPasvolsky/structural-imbalance-notebook that referenced this pull request Oct 21, 2020
JoelPasvolsky added a commit to JoelPasvolsky/hybrid-computing-notebook that referenced this pull request Oct 21, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
7 participants