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

Client import problem #114

Open
tavora-lucas opened this issue Aug 21, 2023 · 1 comment
Open

Client import problem #114

tavora-lucas opened this issue Aug 21, 2023 · 1 comment

Comments

@tavora-lucas
Copy link

tavora-lucas commented Aug 21, 2023

When I try to import client, like this:

from cpppo.server.enip import client

I get this:

Traceback (most recent call last):
  File "c:\Users\itsmemario\Documents\Python\eip\main.py", line 4, in <module>
    from cpppo.server.enip import client
  File "c:\Users\itsmemario\Documents\Python\venv\Lib\site-packages\cpppo\__init__.py", line 29, in <module>
    from .automata import *
  File "c:\Users\itsmemario\Documents\Python\venv\Lib\site-packages\cpppo\automata.py", line 33, in <module>
    from . import misc
  File "c:\Users\itsmemario\Documents\Python\venv\Lib\site-packages\cpppo\misc.py", line 221, in <module>
    change_function( __normal, co_filename=logging._srcfile )
  File "c:\Users\itsmemario\Documents\Python\venv\Lib\site-packages\cpppo\misc.py", line 180, in change_function
    modi_code                   = types.CodeType( *modi_args )
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: code() argument 13 must be str, not int

Additional information:
OS: Windows 11, using venv. Tried without venv, but got same issue.
Python: 3.11.4

Ps:
This doesn't happen on Linux

@beenje
Copy link

beenje commented Sep 9, 2023

This is a Python 3.11 issue (should be the same on Linux). Same as #111

There is a fix in #110 (but still not merged).

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

2 participants