Under Windows, the socket is not closed and cleaned up properly for some reason. So we have to force it. This pull request fixes the problem completely.
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x000001A7FAAEF160>
Traceback (most recent call last):
File "C:\Users\joria\anaconda3\lib\asyncio\proactor_events.py", line 115, in __del__
_warn(f"unclosed transport {self!r}", ResourceWarning, source=self)
File "C:\Users\joria\anaconda3\lib\asyncio\proactor_events.py", line 79, in __repr__
info.append(f'fd={self._sock.fileno()}')
File "C:\Users\joria\anaconda3\lib\asyncio\windows_utils.py", line 102, in fileno
raise ValueError("I/O operation on closed pipe")
ValueError: I/O operation on closed pipe
It includes this pull request too: https://github.com/qwertyquerty/pypresence/pull/234
Under Windows, the socket is not closed and cleaned up properly for some reason. So we have to force it. This pull request fixes the problem completely.
Here is the POC:
And here is the error:
This guy helped me a lot: @JorianWoltjer