coap python3,尝试用python库连接coap资源

所以我尝试使用这个python库https://github.com/chrysn/aiocoap连接到CoaP资源。这个库使用python3.4,我已经安装了3.4并将其设置为与之一起使用的解释器(Im on windows7btw)。当执行clientGET.py文件。服务器文件也是如此。在C:\Python34\python.exe C:/Learning/PyCoap/aiocoap/clientGET.py

Traceback (most recent call last):

File "C:/Learning/PyCoap/aiocoap/clientGET.py", line 34, in

asyncio.get_event_loop().run_until_complete(main())

File "C:\Python34\lib\asyncio\base_events.py", line 268, in run_until_complete

return future.result()

File "C:\Python34\lib\asyncio\futures.py", line 277, in result

raise self._exception

File "C:\Python34\lib\asyncio\tasks.py", line 236, in _step

result = next(coro)

File "C:/Learning/PyCoap/aiocoap/clientGET.py", line 20, in main

protocol = yield from Context.create_client_context()

File "C:\Learning\PyCoap\aiocoap\aiocoap\protocol.py", line 510, in create_client_context

transport, protocol = yield from loop.create_datagram_endpoint(protofact, family=socket.AF_INET6)

File "C:\Python34\lib\asyncio\base_events.py", line 675, in create_datagram_endpoint

waiter)

File "C:\Python34\lib\asyncio\selector_events.py", line 68, in _make_datagram_transport

address, waiter, extra)

File "C:\Python34\lib\asyncio\selector_events.py", line 911, in __init__

super().__init__(loop, sock, protocol, extra)

File "C:\Python34\lib\asyncio\selector_events.py", line 452, in __init__

self._extra['sockname'] = sock.getsockname()

OSError: [WinError 10022] Ein ungultiges Argument wurde angegeben

Process finished with exit code 1

你可能感兴趣的:(coap,python3)