Title: Error when using Python 3.10 · Issue #60 · AuthorizeNet/sample-code-python · GitHub
Open Graph Title: Error when using Python 3.10 · Issue #60 · AuthorizeNet/sample-code-python
X Title: Error when using Python 3.10 · Issue #60 · AuthorizeNet/sample-code-python
Description: Error: File "~/Charge a Credit Card/python_charg_r01.py", line 13, in
Open Graph Description: Error: File "~/Charge a Credit Card/python_charg_r01.py", line 13, in
X Description: 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/...
Opengraph URL: https://github.com/AuthorizeNet/sample-code-python/issues/60
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error when using Python 3.10 ","articleBody":"Error:\r\n```\r\n File \"~/Charge a Credit Card/python_charg_r01.py\", line 13, in \u003cmodule\u003e\r\n from authorizenet import apicontractsv1\r\n File \"~/.local/lib/python3.10/site-packages/authorizenet/apicontractsv1.py\", line 9, in \u003cmodule\u003e\r\n import pyxb.binding\r\n File \"~/.local/lib/python3.10/site-packages/pyxb/binding/__init__.py\", line 8, in \u003cmodule\u003e\r\n from . import datatypes\r\n File \"~/.local/lib/python3.10/site-packages/pyxb/binding/datatypes.py\", line 1243, in \u003cmodule\u003e\r\n from . import content\r\n File \"~/.local/lib/python3.10/site-packages/pyxb/binding/content.py\", line 807, in \u003cmodule\u003e\r\n class _PluralBinding (collections.MutableSequence):\r\n AttributeError: module 'collections' has no attribute 'MutableSequence'\r\n```\r\n\r\nTo fix this issue, you can modify the import in your code from:\r\n\r\n```python\r\nimport collections\r\n```\r\nto:\r\n\r\n```python\r\nimport collections.abc as collections\r\n```\r\nThis change ensures compatibility with Python 3.10 and resolves the AttributeError you encountered.\r\n\r\nin both files\r\ncontent.py\r\nbasis.py\r\n\r\n","author":{"url":"https://github.com/aymhenry","@type":"Person","name":"aymhenry"},"datePublished":"2024-04-04T18:13:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/60/sample-code-python/issues/60"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:553a8473-02da-84fd-c6a6-d142e66e72bd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BF5A:2C5E18:7D3528:A0E2B3:6974FE29 |
| html-safe-nonce | eb9df7f40154eca0b4b6090b7c6488371e44d6021d40c85400f3bf8dc5f7cfc1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRjVBOjJDNUUxODo3RDM1Mjg6QTBFMkIzOjY5NzRGRTI5IiwidmlzaXRvcl9pZCI6IjgxNjYyMzI5NjQ3NTc1MTk5MTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e624e0e3cd2855887157d8999b64ed282d6fc543b448f9ddbd23341238616036 |
| hovercard-subject-tag | issue:2226211908 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/AuthorizeNet/sample-code-python/60/issue_layout |
| twitter:image | https://opengraph.githubassets.com/335b89e12120f54dbf1ffb56c7be8e0a050d3e77786b6168a6de703a2149ee55/AuthorizeNet/sample-code-python/issues/60 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/335b89e12120f54dbf1ffb56c7be8e0a050d3e77786b6168a6de703a2149ee55/AuthorizeNet/sample-code-python/issues/60 |
| og:image:alt | Error: File "~/Charge a Credit Card/python_charg_r01.py", line 13, in |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | aymhenry |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| turbo-cache-control | no-preview |
| go-import | github.com/AuthorizeNet/sample-code-python git https://github.com/AuthorizeNet/sample-code-python.git |
| octolytics-dimension-user_id | 6014037 |
| octolytics-dimension-user_login | AuthorizeNet |
| octolytics-dimension-repository_id | 46103246 |
| octolytics-dimension-repository_nwo | AuthorizeNet/sample-code-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 46103246 |
| octolytics-dimension-repository_network_root_nwo | AuthorizeNet/sample-code-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width