prompt-toolkit / prompt-toolkit/python-prompt-toolkit
RuntimeError: no running event loop on version 3.0.37
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 815
- PR merge metrics
- No merged PRs in 30d
Description
My app (jellex) is getting the following traceback when starting on prompt-toolkit version 3.0.37. Previous versions of prompt-toolkit seem to work fine.
Traceback (most recent call last):
File "/Users/kbrazil/.pyenv/versions/3.11.1/bin/jellex", line 5, in <module>
from jellex.cli import main
File "/Users/kbrazil/.pyenv/versions/3.11.1/lib/python3.11/site-packages/jellex/cli.py", line 231, in <module>
query.insert_text('_')
File "/Users/kbrazil/.pyenv/versions/3.11.1/lib/python3.11/site-packages/prompt_toolkit/buffer.py", line 1269, in insert_text
get_app().create_background_task(self._async_completer())
File "/Users/kbrazil/.pyenv/versions/3.11.1/lib/python3.11/site-packages/prompt_toolkit/application/application.py", line 1057, in create_background_task
loop = self.loop or get_running_loop()
^^^^^^^^^^^^^^^^^^
RuntimeError: no running event loop
sys:1: RuntimeWarning: coroutine 'Buffer._create_completer_coroutine.<locals>.async_completer' was never awaited
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the startup failure in jellex with prompt-toolkit 3.0.37, then inspect prompt_toolkit/buffer.py and prompt_toolkit/application/application.py at the traceback locations. Compare behavior with a working prompt-toolkit version; done means the application starts without the event-loop error or unawaited-coroutine warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100