"Module Not Found Error" (pydivert.consts) - Any Ideas?

Launching mitmproxy and mitmweb from command prompt generates the following error message:

ModuleNotFoundErrod: No module named ‘pydivert.consts’

For example, the full traceback for mitmweb reads:


Traceback (most recent call last):
File “c:\program files\python36\lib\runpy.py”, line 193, in run_module_as_main “main”, mod_spec)
File “c:\program files\python36\lib\runpy.py”, line 85, in run_code exec(code, run_globals)
File "C:\Program Files\Python36\Scripts\mitmweb.exe_main
.py", line 5, in < module>
File “c:\program files\python36\lib\site-packages\mitmproxy\tools\main.py”, line 12, in < module> from mitmproxy.tools import cmdline # noqa
File “c:\program files\python36\lib\site-packages\mitmproxy\tools\cmdline.py”, line 6, in < module> from mitmproxy import platform
File "c:\program files\python36\lib\site-packages\mitmproxy\platform_init
.py", line 33, in < module> from . import windows
File “c:\program files\python36\lib\site-packages\mitmproxy\platform\windows.py”, line 12, in < module> import pydivert.consts
ModuleNotFoundError: No module named ‘pydivert.consts’

And then the launch process just stops.

This may seem basic to some community members, but it’s really frustrating (especially since I had things working just fine before doing a system restore). Reinstalling doesn’t seem to help, and neither does running pip install pydivert.

Thank you for any help, replies or suggestions!

Hi, did you try uninstall pydivert entirely and then re-installing it?

In any case, you may just want to use our binaries for a simpler setup. :slight_smile: