openopc icon indicating copy to clipboard operation
openopc copied to clipboard

opc.read() line killing and restating the kernel

Open kranthiakssy opened this issue 4 years ago • 3 comments

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.

kranthiakssy avatar Jun 11 '20 10:06 kranthiakssy

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.

qqq89513 avatar Jun 26 '20 02:06 qqq89513

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

kranthiakssy avatar Jun 26 '20 03:06 kranthiakssy

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

sj0n avatar Oct 14 '20 16:10 sj0n