【1】cannot import name ‘ParameterSource’ from ‘click.core’
其根本原因在于是black模块,其模块版本可能过时,升级black模块版本即可:
pip install black --upgrade
【2】partially initialized module ‘charset_normalizer’ has no attribute ‘md__mypyc’ (most likely due to a circular import)
pip install chardet
【3】cannot import name ‘_plain_int’ from ‘werkzeug._internal’
pip install --upgrade werkzeug
cannot import name 'url_decode' from 'werkzeug.urls'
pip install --upgrade Flask
【4】Flask返回JSON时中文为Unicode编码
添加如下配置:
app.json.ensure_ascii = False