ya-mouse / openopc

OpenOPC for Python3.4
Other
48 stars 56 forks source link

opc.read() line killing and restating the kernel #15

Open kranthiakssy opened 4 years ago

kranthiakssy commented 4 years ago

I got stuck up with small issue while using openOPC. I have installed python 3.8.3 on windows 10 64 bit system. Installed OpenOPC-Python3x through pip install. Running Matrikon OPC simulation server and OPC explorer for data simulation.

While running the following code, I'm able to connect with Matrikon OPC server, but when I try to read/write the data, kernel is restarting and I'm not able to get any data.

import OpenOPC opc = OpenOPC.client() print(opc.servers()) opc.connect('Matrikon.OPC.Simulation.1') print(opc['Random.Real8'])
opc.close()

Kindly help me to get out of this issue. I also tried with different IDEs (Jupyter, Spyder, IDLE), but same result.

qqq89513 commented 4 years ago

You should use 32 bit version of python. And then you will get another error like this

_pickle.PicklingError: Can't pickle : attribute lookup datetime on pywintypes failed.

This link solves above error.

kranthiakssy commented 4 years ago

@qqq89513 Thanks for the reply. I'll try the same.

sj0n commented 4 years ago

I suggest closing this issue because @qqq89513 's solution works for me.