Skip to content

[BUG] OSError: [WinError 121] The semaphore timeout period has expired #22

@Miniontoby

Description

@Miniontoby

Hi,

Whilst using this package for a while in combination with my MIDI keyboard, I got this error.

The Error

data transfer failed
Traceback (most recent call last):
  File "C:\Users\Miniontoby\AppData\Local\Programs\Python\Python310\lib\site-packages\websockets\legacy\protocol.py", line 945, in transfer_data
    message = await self.read_message()
  File "C:\Users\Miniontoby\AppData\Local\Programs\Python\Python310\lib\site-packages\websockets\legacy\protocol.py", line 1015, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "C:\Users\Miniontoby\AppData\Local\Programs\Python\Python310\lib\site-packages\websockets\legacy\protocol.py", line 1090, in read_data_frame
    frame = await self.read_frame(max_size)
  File "C:\Users\Miniontoby\AppData\Local\Programs\Python\Python310\lib\site-packages\websockets\legacy\protocol.py", line 1145, in read_frame
    frame = await Frame.read(
  File "C:\Users\Miniontoby\AppData\Local\Programs\Python\Python310\lib\site-packages\websockets\legacy\framing.py", line 70, in read
    data = await reader(2)
  File "C:\Users\Miniontoby\AppData\Local\Programs\Python\Python310\lib\asyncio\streams.py", line 708, in readexactly
    await self._wait_for_data('readexactly')
  File "C:\Users\Miniontoby\AppData\Local\Programs\Python\Python310\lib\asyncio\streams.py", line 502, in _wait_for_data
    await self._waiter
  File "C:\Users\Miniontoby\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 282, in _loop_reading
    length = fut.result()
  File "C:\Users\Miniontoby\AppData\Local\Programs\Python\Python310\lib\asyncio\windows_events.py", line 817, in _poll
    value = callback(transferred, key, ov)
  File "C:\Users\Miniontoby\AppData\Local\Programs\Python\Python310\lib\asyncio\windows_events.py", line 485, in finish_recv
    return ov.getresult()
OSError: [WinError 121] The semaphore timeout period has expired

Reason to make issue here

The reason why I believe it is this package, is because this package is the only one to use websockets in my project and because after the error, the whole connection to the OBS websocket is no longer working. The only thing that still works is the other loop that I have for my MIDI keyboard...

System information

  • OS: Windows 10
  • Python: 3.10.5

Additional info

The error only occurs on Windows, when running it on my raspberry pi I don't get the error!
But I am not going to use my raspberry pi for it, since the raspberry pi is located on the top of my closet and the MIDI cable I use is too short to have the keyboard in my reach.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions