Skip to content

Intermittent read error occurs. Help solve the problem #27

@DanilaX1

Description

@DanilaX1

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions