Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running the weather.py example #11

Closed
Jonathan-Developer opened this issue Feb 20, 2016 · 4 comments
Closed

Error running the weather.py example #11

Jonathan-Developer opened this issue Feb 20, 2016 · 4 comments

Comments

@Jonathan-Developer
Copy link

Hi, I'm new to python and I need to write a program using this cpppo library that needs to connect to a server running an Ethernet/IP simulator by Molex in an specific IP address on port 44818.

Using an Ethernet/IP object reader I need to validate that I'm connected and I need to show data from the controller, in this case (RSLinx Server), a first step will be to read object 0x01 that corresponds to the identity. (there's an image attached in this post that shows the Molex Ethernet/IP Simulator)

i wanted to test this weather.py example but I'm getting an error in the line from cpppo.server.enip import device, REAL that tells me this:
The debugged program raised the exception unhandled ImportError
"No module named 'cpppo'"

I've already installed the cpppo library using the terminal command pip install cpppo, so, i've got the library installed already.

Could you guys please help with this matter.

Thanks so much in advance.

ethernet_ip server molex

@pjkundert
Copy link
Owner

If you have installed 'cpppo' using 'pip install cpppo', but then your Python cannot find it -- make sure you are using the same Python. This indicates that there is some issue with your Python installation, not with cpppo.

You might try 'python -m pip install cpppo'. This will ensure that (at least) the same version of Python is being used to perform the pip install.

If, after a 'pip install whatever', you run python, get a '>>> ' prompt, and try 'import whatever'. If this doesn't succeed, then the module you just installed didn't get installed correctly. I'd recommend following some Python getting started documentation to get your feet wet, and work out all of the basic issues with working with Python, and then have another go...

Don't give up. Working with Python on Windows is especially difficult vs. Mac or Linux. But, once you've got all the Windows-y issues worked out, it seems to work OK. Getting the "command line" to work right is especially problematic, but there are work-arounds in the https://github.com/pjkundert/cpppo.git documentation README.org.

Hope that helps.

@Jonathan-Developer
Copy link
Author

Hi pjkundert, thanks for the quick reply, I've pip uninstall cpppo and then python -m pip install cpppo but I'm getting the same error, forgot to mention that I'm working on Virtual Box and Debian 8.3.0. on Windows 7.

virtualbox_debian 8 3 0_20_02_2016_19_41_16

@datasim
Copy link

datasim commented Feb 21, 2016

I would recommend using the command-line. It's probably an issue with your
IDE, not using the same version of Python as on your Debian installation,
or something.

I'd recommend installing other (simpler) modules, and testing them out,
'til you get it to work. Then resume working with cpppo. Follow the
getting started documentation for your IDE, perhaps?

-pjk

On Sat, Feb 20, 2016 at 5:14 PM, jonwolf-ibisa notifications@github.com
wrote:

Hi pjkundert, thanks for the quick reply, I've pip uninstall cpppo and
then python -m pip install cpppo but I'm getting the same error, forgot
to mention that I'm working on Virtual Box and Debian 8.3.0. on Windows 7.

[image: virtualbox_debian 8 3 0_20_02_2016_19_41_16]
https://cloud.githubusercontent.com/assets/17366073/13200003/04695aa0-d80a-11e5-8243-4c92f0b47ef4.png


Reply to this email directly or view it on GitHub
#11 (comment).

@Jonathan-Developer
Copy link
Author

you were right datasim, running the program in terminal runs well, the problem is in Eric IDE, i need to configure some sort of path. Thanks

pjkundert added a commit that referenced this issue Jan 30, 2018
# This is the 1st commit message:

Initial foray in to support for generic CIP Service Code requests

# This is the commit message #2:

No requirement for existence of .multiple segment in failed responses

# This is the commit message #3:

Correct handling of service_code operations in client connector I/O

# This is the commit message #4:

HART Requests almost working
o Cannot derive HART from Logix; service codes overlap

# This is the commit message #5:

Initial working HART I/O card request

# This is the commit message #6:

Support intermixed Tags and already parsed operation in parse_operations

# This is the commit message #7:

Test and decode the Read primary variable response, however:
o Still broken; the CIP Encapsulation path is still suppsed to be to the
  Connection Manager @0x06/1!  The 0x52 Route Path is Port 1, Address 2,
  and the message path should be to @0x035D/8.

# This is the commit message #8:

Success.  Still needs cleanup

# This is the commit message #9:

Further attempts to refine HART pass-thru.
o HART I/O card is not responding as defined in documentation

# This is the commit message #10:

Cleanups for python3, source analysis, unit tests

# This is the commit message #11:

Attempt to parse Read Dynamic Variables reply; 3 unrecognzied bytes?

# This is the commit message #12:

Update to attempt to parse real HART I/O card response
o Minimal Read Dynamic Variables status response?  Not successful
o Implement minimal simulated pass-thru Init/Query, HART commands 1,2,3
o Minor changes to client.py Send RR Data, to have timeout and ticks
  compatible with RSLogix; no difference
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants