ImportError: cannot import name HTTPResponse
jacekjaros opened this issue · 6 comments
jacekjaros commented
OS Debian 9.0
mitmproxy 0.18.2-6
Python 2.7.13
# ./go --help
* Starting proxy server on port 8118...
Loading script: adblock.py
Script error: Traceback (most recent call last):
File "adblock.py", line 10, in <module>
from mitmproxy.protocol.http import HTTPResponse
ImportError: cannot import name HTTPResponse
epitron commented
Hmm... it looks like mitmproxy
reorganized their library. Try changing that line to:
from mitmproxy.http import HTTPResponse
zqhong commented
Why not freeze python requirement?
Using pip freeze > requirements.txt
, and upload requirements.txt
to GitHub. If someone wants to install mitm-adblock, he just run pip install -r requirements.txt
.
emptak123 commented
Script error: Traceback (most recent call last):
File "adblock.py", line 10, in
from mitmproxy.http import HTTPResponse
ImportError: No module named http
im geting the same error but the line
from mitmproxy.http import HTTPResponse
is ok
any hints ?