No module named 'mitmproxy.net'


#1

I’m trying to follow this example https://github.com/mitmproxy/mitmproxy/blob/master/examples/complex/har_dump.py and I’m having issues with the cookie import. I am getting the following error
"Script error: Traceback (most recent call last):
File “…/mitm_scripts/example-script.py”, line 3, in
from mitmproxy.net.http import cookies
ImportError: No module named ‘mitmproxy.net’"

My imports:
import sys
from mitmproxy import ctx
from mitmproxy.net.http import cookies

There is no issue with the import ctx, meaning it finds mitmproxy, however it can’t seem to find the .net module.

Any ideas on what’s going on here? Thanks!


#2

You are most likely using a very outdated version of mitmproxy. Can you update and try again?


#3

Oh duh! I missed the releases at the end of December, sorry about that.

Thanks for the super fast response!