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 when using Python 3.10 #60

Open
aymhenry opened this issue Apr 4, 2024 · 1 comment
Open

Error when using Python 3.10 #60

aymhenry opened this issue Apr 4, 2024 · 1 comment

Comments

@aymhenry
Copy link

aymhenry commented Apr 4, 2024

Error:

  File "~/Charge a Credit Card/python_charg_r01.py", line 13, in <module>
        from authorizenet import apicontractsv1
  File "~/.local/lib/python3.10/site-packages/authorizenet/apicontractsv1.py", line 9, in <module>
        import pyxb.binding
  File "~/.local/lib/python3.10/site-packages/pyxb/binding/__init__.py", line 8, in <module>
        from . import datatypes
  File "~/.local/lib/python3.10/site-packages/pyxb/binding/datatypes.py", line 1243, in <module>
        from . import content
  File "~/.local/lib/python3.10/site-packages/pyxb/binding/content.py", line 807, in <module>
        class _PluralBinding (collections.MutableSequence):
    AttributeError: module 'collections' has no attribute 'MutableSequence'

To fix this issue, you can modify the import in your code from:

import collections

to:

import collections.abc as collections

This change ensures compatibility with Python 3.10 and resolves the AttributeError you encountered.

in both files
content.py
basis.py

@dhanashreeyadav1
Copy link

TCS-Dev Dhanashree- If I try to execute the file, I am not able to reproduce the error because we have replaced the offending serialization library with a newer one, which will hopefully not cause more issues like this.

This issue has been fixed in v1.1.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants