Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Miniontoby opened this issue May 21, 2024 · 0 comments
Open

Comments

@Miniontoby
Copy link

Miniontoby commented May 21, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant