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

Python 2.6 incompatibility #2

Closed
johanfforsberg opened this issue Nov 12, 2014 · 3 comments
Closed

Python 2.6 incompatibility #2

johanfforsberg opened this issue Nov 12, 2014 · 3 comments

Comments

@johanfforsberg
Copy link

I tried installing cppio under Python 2.6 (CentOS 6) and I got this error:

Downloading/unpacking cpppo
  Downloading cpppo-2.9.1.tar.gz (202kB): 202kB downloaded
  Running setup.py egg_info for package cpppo
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/tmp/pip-build-johfor/cpppo/setup.py", line 14, in <module>
        if sys.version_info.major < 3:
    AttributeError: 'tuple' object has no attribute 'major'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/tmp/pip-build-johfor/cpppo/setup.py", line 14, in <module>

    if sys.version_info.major < 3:

AttributeError: 'tuple' object has no attribute 'major'

This is apparently only supported in >=2.7. I have no idea if there are other things preventing cpppo from working on 2.6, but at least it's a good idea to state somewhere that it's only compatible with 2.7 and up.

@pjkundert
Copy link
Owner

Nope, it is unit tested on 2.6; however, I clearly didn't test the setup.py
installer on a 2.5 system! Pull requests appreciated -- I'm in Jerusalem
right now so won't get to it for a few days...

On Wednesday, November 12, 2014, Johan Forsberg notifications@github.com
wrote:

I tried installing cppio under Python 2.6 (CentOS 6) and I got this error:

Downloading/unpacking cpppo
Downloading cpppo-2.9.1.tar.gz (202kB): 202kB downloaded
Running setup.py egg_info for package cpppo
Traceback (most recent call last):
File "", line 16, in
File "/tmp/pip-build-johfor/cpppo/setup.py", line 14, in
if sys.version_info.major < 3:
AttributeError: 'tuple' object has no attribute 'major'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "", line 16, in

File "/tmp/pip-build-johfor/cpppo/setup.py", line 14, in

if sys.version_info.major < 3:

AttributeError: 'tuple' object has no attribute 'major'

This is apparently only supported in >=2.7. I have no idea if there are
other things preventing cpppo from working on 2.6, but at least it's a good
idea to state somewhere that it's only compatible with 2.7 and up.


Reply to this email directly or view it on GitHub
#2.

-pjk

@datasim
Copy link

datasim commented Nov 12, 2014

Sorry, on a 2.6 system (writing this from my phone...)

On Wednesday, November 12, 2014, Perry Kundert notifications@github.com
wrote:

Nope, it is unit tested on 2.6; however, I clearly didn't test the
setup.py
installer on a 2.5 system! Pull requests appreciated -- I'm in Jerusalem
right now so won't get to it for a few days...

On Wednesday, November 12, 2014, Johan Forsberg <notifications@github.com
javascript:_e(%7B%7D,'cvml','notifications@github.com');>
wrote:

I tried installing cppio under Python 2.6 (CentOS 6) and I got this
error:

Downloading/unpacking cpppo
Downloading cpppo-2.9.1.tar.gz (202kB): 202kB downloaded
Running setup.py egg_info for package cpppo
Traceback (most recent call last):
File "", line 16, in
File "/tmp/pip-build-johfor/cpppo/setup.py", line 14, in
if sys.version_info.major < 3:
AttributeError: 'tuple' object has no attribute 'major'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "", line 16, in

File "/tmp/pip-build-johfor/cpppo/setup.py", line 14, in

if sys.version_info.major < 3:

AttributeError: 'tuple' object has no attribute 'major'

This is apparently only supported in >=2.7. I have no idea if there are
other things preventing cpppo from working on 2.6, but at least it's a
good
idea to state somewhere that it's only compatible with 2.7 and up.


Reply to this email directly or view it on GitHub
#2.

-pjk


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

-pjk

@pjkundert
Copy link
Owner

I was incorrect -- cpppo was not unit tested under 2.6! I mis-remembered; I extensively tested one of packages it uses (greenery) under 2.6, but not cpppo!

This has been fixed; cpppo 2.9.2 now works correctly under Python 2.6, and installs correctly via pip. Due to some changes in how python -m executes modules, in order to run the cpppo.server.enip and cpppo.server.enip.client, you must specify the 'main' file explicitly, eg: 'python -m cpppo.server.enip.main --print TAGNAME=DINT[1000]'.

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