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

ImportError: cannot import name 'Mapping' from 'collections' #347

Open
b33fsup3m3 opened this issue Nov 21, 2022 · 3 comments
Open

ImportError: cannot import name 'Mapping' from 'collections' #347

b33fsup3m3 opened this issue Nov 21, 2022 · 3 comments

Comments

@b33fsup3m3
Copy link

┌──(root㉿d3m0n)-[/home/d3m0n/Sublist3r]
└─# python2 sublist3r.py
Traceback (most recent call last):
File "sublist3r.py", line 21, in
from subbrute import subbrute
File "/home/d3m0n/Sublist3r/subbrute/subbrute.py", line 18, in
import dns.resolver
ImportError: No module named dns.resolver

┌──(root㉿d3m0n)-[/home/d3m0n/Sublist3r]
└─# python3 sublist3r.py -d example.com
Traceback (most recent call last):
File "/home/d3m0n/Sublist3r/sublist3r.py", line 23, in
import requests
File "/usr/local/lib/python3.10/dist-packages/requests/init.py", line 43, in
import urllib3
File "/usr/local/lib/python3.10/dist-packages/urllib3/init.py", line 8, in
from .connectionpool import (
File "/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py", line 29, in
from .connection import (
File "/usr/local/lib/python3.10/dist-packages/urllib3/connection.py", line 39, in
from .util.ssl_ import (
File "/usr/local/lib/python3.10/dist-packages/urllib3/util/init.py", line 3, in
from .connection import is_connection_dropped
File "/usr/local/lib/python3.10/dist-packages/urllib3/util/connection.py", line 3, in
from .wait import wait_for_read
File "/usr/local/lib/python3.10/dist-packages/urllib3/util/wait.py", line 1, in
from .selectors import (
File "/usr/local/lib/python3.10/dist-packages/urllib3/util/selectors.py", line 14, in
from collections import namedtuple, Mapping
ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/init.py)

i allready tried to install sublister with apt-get but i still get the same error:

ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/init.py)

@francodevel
Copy link

Holy crap! I've been trying to solve this but no success. Same error. Some places say that that class Mapping, it's in collections.abc, not collections alone. How did you solve it? Any suggestions? I need this tool. Thanks for anything.

@maaz45678
Copy link

i have the same issue , i have tried everything but all in vain , i think last solution to this is changing to older versions of python , i have not tested it , but i think it will work

@francodevel
Copy link

i have the same issue , i have tried everything but all in vain , i think last solution to this is changing to older versions of python , i have not tested it , but i think it will work

I installed python3.7 and it's working fine. I had to compile it. Took a short time to build, so it's a good thing to install it that way.
It's because python3.7 is the last version where you can find this import. Best luck! Try it.

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