运行mitmdump -s addons.py时报错
Traceback (most recent call last):
File "c:\users\cczhao\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "c:\users\cczhao\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\cczhao\AppData\Local\Programs\Python\Python37\Scripts\mitmdump.exe__main.py", line 7, in
File "c:\users\cczhao\appdata\local\programs\python\python37\lib\site-packages\mitmproxy\tools_main.py", line 152, in mitmdump
from mitmproxy.tools import dump
File "c:\users\cczhao\appdata\local\programs\python\python37\lib\site-packages\mitmproxy\tools\dump.py", line 1, in
from mitmproxy import addons
File "c:\users\cczhao\appdata\local\programs\python\python37\lib\site-packages\mitmproxy\addons__init.py", line 12, in
from mitmproxy.addons import onboarding
File "c:\users\cczhao\appdata\local\programs\python\python37\lib\site-packages\mitmproxy\addons\onboarding.py", line 2, in
from mitmproxy.addons.onboardingapp import app
File "c:\users\cczhao\appdata\local\programs\python\python37\lib\site-packages\mitmproxy\addons\onboardingapp__init__.py", line 3, in
from flask import Flask, render_template
File "c:\users\cczhao\appdata\local\programs\python\python37\lib\site-packages\flask\init.py", line 14, in
from jinja2 import escape
File "c:\users\cczhao\appdata\local\programs\python\python37\lib\site-packages\jinja2\init__.py", line 12, in
from .environment import Environment
File "c:\users\cczhao\appdata\local\programs\python\python37\lib\site-packages\jinja2\environment.py", line 25, in
from .defaults import BLOCK_END_STRING
File "c:\users\cczhao\appdata\local\programs\python\python37\lib\site-packages\jinja2\defaults.py", line 3, in
from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401
File "c:\users\cczhao\appdata\local\programs\python\python37\lib\site-packages\jinja2\filters.py", line 13, in
from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (c:\users\cczhao\appdata\local\programs\python\python37\lib\site-packages\markupsafe\init__.py)
参考了其他issues, 使用了3.7的python和5.0.0的mitmproxy
运行mitmdump -s addons.py时报错 Traceback (most recent call last): File "c:\users\cczhao\appdata\local\programs\python\python37\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "c:\users\cczhao\appdata\local\programs\python\python37\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\cczhao\AppData\Local\Programs\Python\Python37\Scripts\mitmdump.exe__main.py", line 7, in
File "c:\users\cczhao\appdata\local\programs\python\python37\lib\site-packages\mitmproxy\tools_main.py", line 152, in mitmdump
from mitmproxy.tools import dump
File "c:\users\cczhao\appdata\local\programs\python\python37\lib\site-packages\mitmproxy\tools\dump.py", line 1, in
from mitmproxy import addons
File "c:\users\cczhao\appdata\local\programs\python\python37\lib\site-packages\mitmproxy\addons__init.py", line 12, in
from mitmproxy.addons import onboarding
File "c:\users\cczhao\appdata\local\programs\python\python37\lib\site-packages\mitmproxy\addons\onboarding.py", line 2, in
from mitmproxy.addons.onboardingapp import app
File "c:\users\cczhao\appdata\local\programs\python\python37\lib\site-packages\mitmproxy\addons\onboardingapp__init__.py", line 3, in
from flask import Flask, render_template
File "c:\users\cczhao\appdata\local\programs\python\python37\lib\site-packages\flask\ init.py", line 14, in
from jinja2 import escape
File "c:\users\cczhao\appdata\local\programs\python\python37\lib\site-packages\jinja2\ init__.py", line 12, in
from .environment import Environment
File "c:\users\cczhao\appdata\local\programs\python\python37\lib\site-packages\jinja2\environment.py", line 25, in
from .defaults import BLOCK_END_STRING
File "c:\users\cczhao\appdata\local\programs\python\python37\lib\site-packages\jinja2\defaults.py", line 3, in
from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401
File "c:\users\cczhao\appdata\local\programs\python\python37\lib\site-packages\jinja2\filters.py", line 13, in
from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (c:\users\cczhao\appdata\local\programs\python\python37\lib\site-packages\markupsafe\ init__.py)