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

Pyro5.errors.ProtocolError: invalid protocol version: 5 #61

Open
Shubh03121998 opened this issue Apr 19, 2024 · 0 comments
Open

Pyro5.errors.ProtocolError: invalid protocol version: 5 #61

Shubh03121998 opened this issue Apr 19, 2024 · 0 comments

Comments

@Shubh03121998
Copy link

Hello sir,
I am requesting for your help, i have a python application that is based on openopc python library , now i wanted to migrate an application using openopc 2 and Pyro5, but i am facing an error

My setup like this:
I have small application , this application uses openopc2 and Pyro5 to connect to OpenOPC gateway service which is running on windows machine and also matrikon opc simulation server is also running on the windows machine only, i am running this application using python3.8 version

This is small code i am using for testing purpose:

`from openopc2.config import OpenOpcConfig
from openopc2.utils import get_opc_da_client

open_opc_config = OpenOpcConfig()

open_opc_config.OPC_SERVER = "Matrikon.OPC.Simulation"
open_opc_config.OPC_GATEWAY_HOST = "192.168.2.5"
open_opc_config.OPC_CLASS = "Graybox.OPC.DAWrapper"
open_opc_config.OPC_MODE = 'gateway'

opc_client = get_opc_da_client(open_opc_config)
print(opc_client.info())`

And the issue i am facing:

OpenOPC in gateway mode Traceback (most recent call last): File "check.py", line 13, in <module> opc_client = get_opc_da_client(open_opc_config) File "/home/pi/check/openopc2/utils.py", line 14, in get_opc_da_client opc_da_client.connect(config.OPC_SERVER, config.OPC_HOST) File "/usr/local/lib/python3.8/site-packages/Pyro5/client.py", line 101, in __getattr__ self._pyroGetMetadata() File "/usr/local/lib/python3.8/site-packages/Pyro5/client.py", line 392, in _pyroGetMetadata self.__pyroCreateConnection() File "/usr/local/lib/python3.8/site-packages/Pyro5/client.py", line 376, in __pyroCreateConnection connect_and_handshake(conn) File "/usr/local/lib/python3.8/site-packages/Pyro5/client.py", line 325, in connect_and_handshake msg = protocol.recv_stub(conn, [protocol.MSG_CONNECTOK, protocol.MSG_CONNECTFAIL]) File "/usr/local/lib/python3.8/site-packages/Pyro5/protocol.py", line 190, in recv_stub ReceivingMessage.validate(header) File "/usr/local/lib/python3.8/site-packages/Pyro5/protocol.py", line 145, in validate raise errors.ProtocolError("invalid protocol version: {:d}".format(int.from_bytes(data[4:6], "big"))) Pyro5.errors.ProtocolError: invalid protocol version: 5

Your suggestion are welcome on how do i migrate my application to openopc2.
Thank you :)

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