aboul3la / Sublist3r

Fast subdomains enumeration tool for penetration testers
GNU General Public License v2.0
9.9k stars 2.11k forks source link

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

Open b33fsup3m3 opened 2 years ago

b33fsup3m3 commented 2 years ago

┌──(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 commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

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.