Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Protocol Error

Help
2012-01-13
2013-05-30
  • Andy Lawton
    Andy Lawton
    2012-01-13

    OpenOPC 1.1.6, Python 2.7, Pyro 3.15 all running on Windows 7. Gateway installed, and using the command line program
    opc -H localhost -o values -s MyOPC.OPCServer.1 myitem
    Works fine. Running a small python program:
    import OpenOPC

    def main():

        opc = OpenOPC.open_client('localhost')
        opc.connect('Matrikon.OPC.Simulation')
        opc.read('Random.Int4')

    if __name__ == '__main__':
        main()

    Gives an error here in protocol.py:
    if pflags&PFLG_XMLPICKLE_GNOSIS:
    conn.pflags|=PFLG_XMLPICKLE_GNOSIS
    if ver!=self.version:
    msg='incompatible protocol version'
    Log.error('PYROAdapter',msg)
    if not noReply:
    # try to report error to client, but most likely the connection will terminate:
    self.returnException(conn, ProtocolError(msg))
    raise ProtocolError(msg)

    Does this mean that my version of pyro is incorrect for the version of the gateway? Or is there some other reason?
    I am very new to python … like 2 hours …

     
  • You are receiving the "protocol error" because the version of Pyro you installed on your development box does not match the version of Pyro that is built into the OpenOPC Gateway Service.   

    With OpenOPC 1.1.6 you must use Pyro version 3.10 in order for it to work.   However if you upgrade to the newest OpenOPC 1.2.0 that was just released, then you can safely use the newest version of Pyro which is 3.15.