747929791 / majsoul_wrapper

自动化雀魂AI的SDK,实时解析雀魂对局信息,并模拟鼠标动作出牌
MIT License
395 stars 61 forks source link

ImportError: cannot import name 'soft_unicode' from 'markupsafe' #26

Open BIGCGOD opened 7 months ago

BIGCGOD commented 7 months ago

参考了其他issues, 使用了3.7的python和5.0.0的mitmproxy

pip show mitmproxy Name: mitmproxy Version: 5.0.0 Summary: An interactive, SSL/TLS-capable intercepting proxy for HTTP/1, HTTP/2, and WebSockets. Home-page: http://mitmproxy.org Author: Aldo Cortesi Author-email: aldo@corte.si License: MIT Location: c:\users\cczhao\appdata\local\programs\python\python37\lib\site-packages Requires: pyOpenSSL, hyperframe, h2, protobuf, ruamel.yaml, passlib, ldap3, urwid, blinker, publicsuffix2, pyasn1, click, wsproto, flask, sortedcontainers, tornado, kaitaistruct, pyperclip, certifi, cryptography, pydivert, Brotli, zstandard, pyparsing Required-by: python --version Python 3.7.9

运行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)

dapiao-zhangwan commented 5 months ago

https://blog.csdn.net/wm9028/article/details/124455181 我看了这个好了 pip install markupsafe==2.0.1