ModuleNotFoundError: No module named 'dns'

Hi, I am using theHarvester on Kali Linux 2019.4 on VMware. On my test web page. Trying theHarvester from github. And also the one that comes with Kali. I am trying “python3.8 -d mywebpage -b all -l 500” on the github version of theHarvester. I get the error:

‘NoneType’ object has no attribute ‘headers’

I found a lot of “NoneType” errors on the web but nothing that applies to me. So how do I fix this and run theHarvester? If I use :

root@kali:~# theHarvester -d mywebsite -b all -l 500

I get the error:

ModuleNotFoundError: No module named ‘dns’

I tried: pip install dns, pip3 install dns, pip3 install py3dns. Still get the same error “no dns”. I updated pip to 2020. This might be an easy question but I need to know. If I try: python -d mywebsite -b all -l 500, I get the error:

Make sure you have Python 3.7+ installed, quitting.

I have Python 3.8 installed. If I try: python3.7 -d mywebsite -b all -l 500, I get the same “dns” error. That’s for /opt/theHarvester-master from GitHub and theHarvester from Kali (root@kali:). I just tried with Python3.8 again and got the error:

[Errno 101] Network is unreachable

For “DuckDuckGo.”

I tried using Kali Linux for Subsystem and it gets past DuckDuckGo but then says:

“substring not found.”

(That’s for Trello.) DuckDuckGo also says:

“Max retries exceeded with url.”

Sorry about the long list… So how do I get theharvester to run? -b all? I’d prefer it in the “root@kali:” location. Or /opt. I don’t use WSL very often. And where do I get all api-keys? For all of theHarvester? I want this to work on Kali VM. Here’s more…

/opt/theHarvester (from Github -master.)

Please reply. Thanks

Hi, I’m back… Does anyone know how to fix “ModuleNotFoundError: No module named ‘dns’”? Or “‘NoneType’ object has no attribute ‘headers’”? Thanks in advance.

Anyone? DNS?

Hi there!
I guess that’s gonna help - pip install dnspython
Look there for more -


Well, this can easily help Had absolutely the same error, and that’s the only checker which works for my website. All the others give me hard time with this check.