ConnectionResetError on Python 3.8 for windows
See original GitHub issueUsing the simplest feature (prompt
) fails with async exception.
After running the prompt, I kept pressing a
,enter
.
I’m using Windows 10, prompt_toolkit.__version__ = '2.0.10'
Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from prompt_toolkit import prompt
>>>
>>> while 1:
... user_input = prompt('>')
... print(user_input)
...
>a
a
>a
a
>a
a
Unhandled exception in event loop:
File "C:\Python38\lib\asyncio\proactor_events.py", line 768, in _loop_self_reading
f.result() # may raise
File "C:\Python38\lib\asyncio\windows_events.py", line 808, in _poll
value = callback(transferred, key, ov)
File "C:\Python38\lib\asyncio\windows_events.py", line 457, in finish_recv
raise ConnectionResetError(*exc.args)
Exception [WinError 995] The I/O operation has been aborted because of either a thread exit or an application request
Press ENTER to continue...
>a
a
>a
a
>a
a
>a
a
Unhandled exception in event loop:
File "C:\Python38\lib\asyncio\proactor_events.py", line 768, in _loop_self_reading
f.result() # may raise
File "C:\Python38\lib\asyncio\windows_events.py", line 808, in _poll
value = callback(transferred, key, ov)
File "C:\Python38\lib\asyncio\windows_events.py", line 457, in finish_recv
raise ConnectionResetError(*exc.args)
Exception [WinError 995] The I/O operation has been aborted because of either a thread exit or an application request
Press ENTER to continue...
>a
a
>a
a
>
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Error in ipython console "Exception [WinError 995] The I/O ...
I have installed python 3.8.5 and in ipython 7.19.0 via Anaconda installer on Windows 10 machine and I get the following error in...
Read more >wait_closed() can raise ConnectionResetError - Python tracker
open_connection` fails with `ConnectionRefusedError` until I restart the entire Python process. IIUC, just ignoring the exception will not be ...
Read more >ProactorEventLoop raises unhandled ConnectionResetError
start() loop.run_forever() ``` Leave it running on Windows, in Python 3.8 for a few seconds, then it starts spawning `ConnectionResetError`s.
Read more >Built-in Exceptions — Python 3.11.1 documentation
In Python, all exceptions must be instances of a class that derives from BaseException. ... the errno attribute is determined from the Windows...
Read more >http.client — HTTP protocol client — Python 3.11.1 ...
A subclass of ConnectionResetError and BadStatusLine . Raised by HTTPConnection.getresponse() when the attempt to read the response results in no data read ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Issue opened at bugs.python.org: https://bugs.python.org/issue39010
This was fixed in Python: https://github.com/python/cpython/pull/22017 Best is to upgrade to a Python version that includes the fix, like Python 3.8.7.
Otherwise, the workaround is to make sure a
SelectorEventLoop
is used by asyncio. See for instance how it’s done here: https://github.com/xonsh/xonsh/issues/3430