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

Winsock error #21

Open
gvanem opened this issue Jan 28, 2023 · 2 comments
Open

Winsock error #21

gvanem opened this issue Jan 28, 2023 · 2 comments

Comments

@gvanem
Copy link

gvanem commented Jan 28, 2023

This seems like a cool project, but I'm not sure about the Windows support.
Since for any configuration, I get this error:

....
  File "F:\gv\Python310\lib\site-packages\pytak\client_functions.py", line 80, in create_udp_client
    reader = await dgbind((host, port))
  File "F:\gv\Python310\lib\site-packages\pytak\asyncio_dgram\aio.py", line 238, in bind
    transport, protocol = await loop.create_datagram_endpoint(
  File "F:\gv\Python310\lib\asyncio\base_events.py", line 1371, in create_datagram_endpoint
    raise exceptions[0]
  File "F:\gv\Python310\lib\asyncio\base_events.py", line 1355, in create_datagram_endpoint
    sock.bind(local_address)
OSError: [WinError 10049] Cannot assign requested address.

10049 == WSAEADDRNOTAVAIL.
Ref: https://learn.microsoft.com/en-us/windows/win32/winsock/windows-sockets-error-codes-2

With some added trace, I see the address in pytak/asyncio_dgram/aio.py is ('239.2.3.1', 6969) and family == 0 (AF_UNSPEC).

Even after adding COT_URL = udp://239.255.255.250:6969 to my config.ini, it fails.

@ampledata
Copy link
Collaborator

ampledata commented Jan 30, 2023 via email

@gvanem
Copy link
Author

gvanem commented Jan 31, 2023

Can you tell me a little bit more about the
Python environment you've setup on Windows, and which version of Windows?

I'm using CPython 3.11 (for x64) on Windows-10.
I'm not sure about this error with udp://239.255.255.250:6969. Seems invalid as a local address. How does this work on Linux (?)

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

2 participants