The error like that:
Traceback (most recent call last):
File "open_opc_new.txt", line 70, in
disconnect_server(opc)
File "open_opc_new.txt", line 53, in disconnect_server
opc.close()
File "D:\ProgramData\Anaconda2\lib\site-packages\Pyro\core.py", line 381, in
call_
return self.__send(self.__name, args, kwargs)
File "D:\ProgramData\Anaconda2\lib\site-packages\Pyro\core.py", line 456, in
invokePYRO
return self.adapter.remoteInvocation(name, Pyro.constants.RIF_VarargsAndKey
ords, vargs, kargs)
File "D:\ProgramData\Anaconda2\lib\site-packages\Pyro\protocol.py", line 497,
in remoteInvocation
return self._remoteInvocation(method, flags, *args)
File "D:\ProgramData\Anaconda2\lib\site-packages\Pyro\protocol.py", line 572,
in _remoteInvocation
answer.raiseEx()
File "D:\ProgramData\Anaconda2\lib\site-packages\Pyro\errors.py", line 72, in
raiseEx
raise self.excObj
Pyro.errors.ProtocolError: unknown object ID
my program:
def connect_server(host):
opc = OpenOPC.open_client(host)
print(opc.servers())
opc.connect('SWToolbox.TOPServer.V6')
return opc
def get_data(opc,l):
start = time.time()
val = opc.read(l) #error
#print(val)
end = time.time()
t = end - start
print('time:', t)
return t, val
the error occured when read the tag value , and anyone have some advises??