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

asyncio.run() fails in the notebook #4312

Closed
pylang opened this issue Jan 3, 2019 · 3 comments
Closed

asyncio.run() fails in the notebook #4312

pylang opened this issue Jan 3, 2019 · 3 comments

Comments

@pylang
Copy link

pylang commented Jan 3, 2019

Problem

I cannot run in the notebook a demo from the asyncio docs:

2019-01-02 23_08_03-untitled

Observation

It does seem to run in ipython:

2019-01-02 23_06_19-cmder

Setup

I've installed a new everything on a fresh install of Windows 10.
I am running Python 3.7 via Anaconda 2018.12.

conda                     4.5.12                   py37_0
ipykernel                 5.1.0            py37h39e3cac_0
ipython                   7.2.0            py37h39e3cac_0
jupyter                   1.0.0                    py37_7
jupyter_client            5.2.4                    py37_0
notebook                  5.7.4                    py37_0
@takluyver
Copy link
Member

cc @Carreau

@Carreau
Copy link
Member

Carreau commented Jan 18, 2019

Yes, it is a known limitation.
You need to use things like nest-async-io. This is documented here.

You should be able to just await main()

@Carreau
Copy link
Member

Carreau commented Jan 18, 2019

I'm going to close as I'm not sure there is much we can do as nesting event loop is a bad idea.
Feel free to keep commenting or ask for a re-open.

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

3 participants