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

aiohttp fails on ipython with RuntimeError: There is no current event loop in thread 'MainThread'. #14375

Open
renaudjester opened this issue Mar 27, 2024 · 0 comments

Comments

@renaudjester
Copy link

Hello! I noticed an odd behaviour with async code with ipython==8.18.1 (and I suspect that the same would happen with ipython>8.17.2)
Indeed I get an RuntimeError: There is no current event loop in thread 'MainThread'. when running aiohttp.TCPConnector()

To reproduce

Start ipython console with ipython==8.18.1 for eg

import aiohttp

connector = aiohttp.TCPConnector()

Raises
RuntimeError: There is no current event loop in thread 'MainThread'.

This code actually works in a python console. What is happening here? Is there a work around?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant