Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

RuntimeError: This event loop is already running cause using jupyter as editor #30

@Yukimagi

Description

@Yukimagi

RuntimeError Traceback (most recent call last)
Cell In[10], line 25
23 if name == "main":
24 loop = asyncio.get_event_loop()
---> 25 loop.run_until_complete(test_ask())

File ~\anaconda3\Lib\asyncio\base_events.py:629, in BaseEventLoop.run_until_complete(self, future)
618 """Run until the Future is done.
619
620 If the argument is a coroutine, it is wrapped in a Task.
(...)
626 Return the Future's result, or raise its exception.
627 """
628 self._check_closed()
--> 629 self._check_running()
631 new_task = not futures.isfuture(future)
632 future = tasks.ensure_future(future, loop=self)

File ~\anaconda3\Lib\asyncio\base_events.py:588, in BaseEventLoop._check_running(self)
586 def _check_running(self):
587 if self.is_running():
--> 588 raise RuntimeError('This event loop is already running')
589 if events._get_running_loop() is not None:
590 raise RuntimeError(
591 'Cannot run the event loop while another loop is running')

RuntimeError: This event loop is already running

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions