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

Mapping class not found #1

Closed
KnownBlackHat opened this issue Dec 29, 2022 · 2 comments
Closed

Mapping class not found #1

KnownBlackHat opened this issue Dec 29, 2022 · 2 comments

Comments

@KnownBlackHat
Copy link

Traceback (most recent call last):
File "", line 1, in
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/init.py)

@jramos823
Copy link

Take the path from the error, and edit the init file. I added these three imports and the exploit successfully ran.

from collections.abc import Mapping
from collections.abc import MutableMapping
from collections.abc import Sequence

I used this problem for reference:
https://stackoverflow.com/questions/72167725/python-importerror-cannot-import-name-mapping-from-collections-c-progra

@pedrohavay
Copy link
Owner

Take the path from the error, and edit the init file. I added these three imports and the exploit successfully ran.

from collections.abc import Mapping from collections.abc import MutableMapping from collections.abc import Sequence

I used this problem for reference: https://stackoverflow.com/questions/72167725/python-importerror-cannot-import-name-mapping-from-collections-c-progra

Exactly! The way to import has changed since Python version 3.10.

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