On Windows seems to be a problem with EventLoopPolicy, use this snippet to work around it:
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
asyncio.run(main())
More Related Contents:
- When to use and when not to use Python 3.5 `await` ?
- “Fire and forget” python async/await
- How can I periodically execute a function with asyncio?
- How to use asyncio with existing blocking library?
- How to use ‘yield’ inside async function?
- Does asyncio supports asynchronous I/O for file operations?
- asyncio.ensure_future vs. BaseEventLoop.create_task vs. simple coroutine?
- How to use asyncio with threading in Python is Method threading.Timer
- How does asyncio actually work?
- What are type hints in Python 3.5?
- FastAPI runs api-calls in serial instead of parallel fashion
- asyncio.sleep() vs time.sleep()
- How to combine python asyncio with threads?
- How can I call an async function without await?
- asyncio CancelledError and KeyboardInterrupt
- How can I send an HTTP request from my FastAPI app to another site (API)?
- Python simple socket client/server using asyncio
- Simplest async/await example possible in Python
- Self-reference or forward-reference of type annotations in Python [duplicate]
- Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
- How to run multiple commands synchronously from one subprocess.Popen command?
- Why am I getting “invalid syntax” from an f-string? [duplicate]
- Using asyncio.Queue for producer-consumer flow
- typing.Any vs object?
- Make a Python asyncio call from a Flask route
- Create generator that yields coroutine results as the coroutines finish
- Is it possible to run only a single step of the asyncio event loop
- Handling Timeouts with asyncio
- how to add a coroutine to a running asyncio loop?
- How to combine Celery with asyncio?