RuntimeError: asyncio.run() cannot be called from a running event loop #568
Unanswered
fangzhangmnm
asked this question in
Forums - Q&A
Replies: 2 comments
-
it depends on the IPython version. New IPython versions (>= 7.0) run in an asynchronous context which is why it raises the could you try the following: await main() instead of asyncio.run(main()) |
Beta Was this translation helpful? Give feedback.
0 replies
-
@fangzhangmnm Please run the following code in notebook: import nest_asyncio
nest_asyncio.apply() Also try the recent version |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
crawl4ai version
0.4.247
Expected Behavior
When running the demo code from jupyter notebook
it should reproduce the demo result
Current Behavior
instead, one get RuntimeError: asyncio.run() cannot be called from a running event loop
Is this reproducible?
Yes
Inputs Causing the Bug
Steps to Reproduce
Code snippets
OS
Windows
Python version
3.11.5
Browser
No response
Browser version
No response
Error logs & Screenshots (if applicable)
No response
Beta Was this translation helpful? Give feedback.
All reactions