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

[WinError 10040] A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram into was smaller than the datagram itself #1

Open
SeanPesce opened this issue Apr 6, 2022 · 0 comments
Labels
bug Something isn't working Windows Windows-specific issue

Comments

@SeanPesce
Copy link
Owner

SeanPesce commented Apr 6, 2022

On some (all?) Python versions for Windows, the following error occurs when the mirror tool attempts to read UDP data from the socket:

Traceback (most recent call last):
  File ".\spade_mirror.py", line 497, in <module>
    print(f'Server battery at {client.battery}%')
  File ".\spade_mirror.py", line 444, in battery
    response = self.send_command(msg)
  File ".\spade_mirror.py", line 423, in send_command
    self.connect()
  File ".\spade_mirror.py", line 261, in connect
    response = self.send_command(msg, True)
  File ".\spade_mirror.py", line 431, in send_command
    response, server = self.command_sock.recvfrom(msg.sizeof())
OSError: [WinError 10040] A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram into was smaller than the datagram itself

I'll have to wrap the recvfrom call to fix this.

@SeanPesce SeanPesce added bug Something isn't working Windows Windows-specific issue labels Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Windows Windows-specific issue
Projects
None yet
Development

No branches or pull requests

1 participant