OpenOPC icon indicating copy to clipboard operation
OpenOPC copied to clipboard

Problems with pywintypes

Open MattRho92 opened this issue 6 years ago • 1 comments

Hello, I'm trying to learn how to use this library in python 3.6.4, win10, but this error appears :

Traceback (most recent call last):
  File "C:\Python36\lib\multiprocessing\queues.py", line 234, in _feed
    obj = _ForkingPickler.dumps(obj)
  File "C:\Python36\lib\multiprocessing\reduction.py", line 51, in dumps
    cls(buf, protocol).dump(obj)
_pickle.PicklingError: Can't pickle <class 'pywintypes.datetime'>: attribute lookup datetime on pywintypes failed

The code is very simple and runned using PyCharm, I was just following the tutorial to use OpenOPC.

import OpenOPC opc = OpenOPC.client() opc.connect('Matrikon.OPC.Simulation.1', 'localhost') print(opc.read('Random.Int1'))

Help please.

MattRho92 avatar Feb 22 '19 18:02 MattRho92

Trying using...

`import pywintypes

Due to picklingError with datetime

pywintypes.datetime = pywintypes.TimeType`

fnk382 avatar Oct 05 '19 18:10 fnk382