Open vantaka2 opened 5 years ago
@mkwiatkowski - Any thoughts? I installed OpenOPC from your fork.
Appreciate the help!
Sort of solved my own issue via: https://stackoverflow.com/questions/52747503/openopc-with-python-3-6/53716394#53716394
I was using openOPCService from python 2.7.
Running everything with python 2.7 works but I can't seem to run the 3.x version of openOPCService
@vantaka2
I was using openOPCService from python 2.7.
I have your same issue with python 3.x. I'm confused. How did you started openOPCService?
@cesclondon87 I am unable to start openOPCService on my own, but I was able to start it by installing openOPC from https://sourceforge.net/projects/openopc/files/.
openOPCService is started during installation.
@vantaka2
Sorry but I don't understand. My steps are:
1) Download v1.31 .exe and install it
2) Test to see if the OpenOPC Gateway Service is functioning by entering: opc -m open -i => it works and i'm able to read variable
3) install python 3.7
4) install via pip: OpenOPC-Python3x==1.2.2 & Pyro4==4.74
5) test with python code but it return your same initial error:
import OpenOPC OpenOPC.open_client('localhost')
Thanks for your help
@cesclondon87 :
I was unable to get this running with python 3.X;
What I did was steps 1 & 2 just as you did.
For step 3, I installed python 2.7 and created a virtual environment
pip install the python 2 version of OpenOPC (https://github.com/sightmachine/OpenOPC); (you could also just copy the files over from the install you did in step 1).
pip install pywin32==224 pip install pyro==3.16
Hope that helps.
@vantaka2 Now it works with your help! Thanks a lot!!
@cesclondon87 - If you get it to work with python3, please let me know!
@vantaka2 certainly, of course. I need that it works with python3, too. But for the moment i think i will create a docker container with python 2.7 + flask in order to create a mini API accessible from python 3.
Has anyone made any progress on this? I have successfully gotten OpenOPC to work with Python 2.7 and I downloaded and import the OpenOPC library for Python 3.4+ from this repository (https://github.com/joseamaita/openopc120). I am getting an unsupported protocol version error from Pyro4. I've checked that the local and the remote machine with the OPC server are protocol version 48. Also, the opc command line is complaining that it cannot connect to the gateway service at 0.0.0.0:7766. I have the OPC_GATE_HOST set to the hostname of my remote machine.
I am using: Python 3.6.8 32-bit Pyro4==4.55 pywin32==224
Hello, I'm running in circles for a while now, have you guys solved it? @vantaka2 @cesclondon87 Thanks.
For me this issue was resolved when I manually downloaded, extracted and installed Pyro4.8 ... I shifted to newly extracted Pyro folder and used 'python setup.py install' ... instead of using 'pip install Pyro4'
Hello @Sandeep-Chavarkar, what python version are you using? is it 32 or 64 bit? what operating system? thank you
I found the reason, you can't install OpenOpc directly from the installation package otherwise it using pyro to talk to the gateway service not pyro4。 i solved the issue by refer this https://joseamaita.com/en/openopc-and-python-37-on-windows/
BTW, using Anaconda install python doesn't work for me, I don't know why.
I'm trying to connect to the Matrikon OPC Simulation server which is running on the same system.
my code:
The error:
ProtocolError: invalid data or unsupported protocol version
My packages:
and using python 3.7.0:
I believe this is a problem on the python side because I am able to connect and run commands using the command line client (opc.exe): running:
opc -H localhost -h localhost -s Matrikon.OPC.Simulation -r Random.Int4
successfully yieldsRandom.Int4 32757 Good 12/10/18 19:24:24
Full error: any idea why pyro4 is causing issues here?