Open ivannp opened 4 years ago
I can reproduce it, although slightly different. In my case, (win10, Python 3.8.1), the progress bar shows and goes until the end, but then it hangs and pressing any key causes this error message.
Hi @ivannp, can you test whether this PR will fix it? https://github.com/prompt-toolkit/python-prompt-toolkit/pull/1039
Hello @jonathanslenders, i had the same issue. Your PR #1039 fixes this issue for me. Thanks a lot! (Win10, Py3.7.5)
Thanks for trying! I'll close this for now. Let me know if there still some issues.
Is this the same problem?
Traceback (most recent call last):
File "C:\Program Files\Python38\lib\concurrent\futures\thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "C:\Program Files\Python38\lib\site-packages\prompt_toolkit\input\win32.py", line 528, in wait
loop.call_soon_threadsafe(ready)
File "C:\Program Files\Python38\lib\asyncio\base_events.py", line 764, in call_soon_threadsafe
self._check_closed()
File "C:\Program Files\Python38\lib\asyncio\base_events.py", line 508, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files\Python38\lib\concurrent\futures\_base.py", line 328, in _invoke_callbacks
callback(self)
File "C:\Program Files\Python38\lib\asyncio\futures.py", line 374, in _call_set_state
dest_loop.call_soon_threadsafe(_set_state, destination, source)
File "C:\Program Files\Python38\lib\asyncio\base_events.py", line 764, in call_soon_threadsafe
self._check_closed()
File "C:\Program Files\Python38\lib\asyncio\base_events.py", line 508, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
progressbar and input, both in async tasks,
Managed to get a repro to a short script (Python 3.7.5 on Windows):
No prompt comes back. When I hit any key, I get: