-
Notifications
You must be signed in to change notification settings - Fork 56
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
Intermittent read error occurs. Help solve the problem #27
Comments
The returned error is 0x80080005 (returned by DCOM on the target system). Is the error occurs on the same requests as when it runs fine or accessing different objects? This also might mean wrong CLSID, not sufficient rights and so on. You should check the windows event log on the server. If the Freelance2000OPCServer have own logs, check it also. |
The error 0x80020009 means invalid value. |
In common sense, it's better to catch exceptions, log failed attempt and retry. |
I made some changes and now I'm getting the error about once a week -2147024732 |
For a better understanding of the problem, I will give the code of the function. In it I use the read function opc.iread(self.tags)
|
Intermittent read error occurs. Help solve the problem
2023-01-18 00:00:35,292 ERROR Connect: -2146959355
Traceback (most recent call last):
File "C:\Users\Freelancer\PycharmProjects\OPC_DATA\venv\lib\site-packages\OpenOPC.py", line 223, in connect
self._opc.Connect(s, opc_host)
File "C:\Users\FREELA~1\AppData\Local\Temp\gen_py\3.8\341A7851-5DEA-4022-B0D6-F9954AF9273Dx0x1x0.py", line 233, in Connect
return self.oleobj.InvokeTypes(1610743826, LCID, 1, (24, 0), ((8, 1), (12, 17)),ProgID
pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, None, None, None, 0, -2146959355), None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Freelancer\PycharmProjects\OPC_DATA\WRdbSchedule.py", line 68, in RdAndWrOPCtoDB
maplai.rdtagfor_db()
File "C:\Users\Freelancer\PycharmProjects\OPC_DATA\WRdbSchedule.py", line 36, in rdtagfor_db
opc.connect('Freelance2000OPCServer.51')
File "C:\Users\Freelancer\PycharmProjects\OPC_DATA\venv\lib\site-packages\OpenOPC.py", line 227, in connect
raise OPCError(error_msg)
OpenOPC.OPCError: Connect: -2146959355
I made a script to write data to a database. Reading and writing occurs once every 5 seconds. Unfortunately, this script does not work stably for 1 or 5 days, then such an error occurs. Help find a solution
The text was updated successfully, but these errors were encountered: