client_to_prosys.py #793
Unanswered
FatimaRani
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
while running the code of client_to_prosys.py , I got the following error
C:\Users\Fatima\PycharmProjects\pythonOPCUAClient\venv\Scripts\python.exe C:/Users/Fatima/PycharmProjects/pythonOPCUAClient/client_to_prosys.py
ERROR:asyncua.client.ua_client.UASocketProtocol:Exception raised while parsing message from server
Traceback (most recent call last):
File "C:\Users\Fatima\PycharmProjects\pythonOPCUAClient\venv\lib\site-packages\asyncua\client\ua_client.py", line 88, in _process_received_data
data = bytes(buf)
TypeError: bytes returned non-bytes (type bytearray)
WARNING:asyncua.client.ua_client.UaClient:disconnect_socket was called but connection is closed
Traceback (most recent call last):
File "C:\Users\Fatima\PycharmProjects\pythonOPCUAClient\client_to_prosys.py", line 29, in
asyncio.run(main())
File "C:\Python310\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Python310\lib\asyncio\base_events.py", line 641, in run_until_complete
return future.result()
File "C:\Users\Fatima\PycharmProjects\pythonOPCUAClient\client_to_prosys.py", line 22, in main
async with Client(url=url) as client:
File "C:\Users\Fatima\PycharmProjects\pythonOPCUAClient\venv\lib\site-packages\asyncua\client\client.py", line 68, in aenter
await self.connect()
File "C:\Users\Fatima\PycharmProjects\pythonOPCUAClient\venv\lib\site-packages\asyncua\client\client.py", line 247, in connect
await self.create_session()
File "C:\Users\Fatima\PycharmProjects\pythonOPCUAClient\venv\lib\site-packages\asyncua\client\client.py", line 370, in create_session
response = await self.uaclient.create_session(params)
File "C:\Users\Fatima\PycharmProjects\pythonOPCUAClient\venv\lib\site-packages\asyncua\client\ua_client.py", line 297, in create_session
data = await self.protocol.send_request(request)
File "C:\Users\Fatima\PycharmProjects\pythonOPCUAClient\venv\lib\site-packages\asyncua\client\ua_client.py", line 148, in send_request
raise ConnectionError("Connection is closed") from None
ConnectionError: Connection is closed
Process finished with exit code 1
Beta Was this translation helpful? Give feedback.
All reactions