在GITHUB上下了代码运行时报错,哪位大神可以指导一下!在线求解

Author: Dream2020, Created: 2021-04-04 11:45:56, Updated:

错误如下: Traceback (most recent call last): File “C:/Users/peng/PycharmProjects/fmz_extend_api_demo-master/app.py”, line 22, in from flask_wtf import FlaskForm File “D:\Program Files (x86)\Python\Python38\lib\site-packages\flask_wtf__init.py”, line 17, in from .recaptcha import * File “D:\Program Files (x86)\Python\Python38\lib\site-packages\flask_wtf\recaptcha__init.py”, line 2, in from .fields import * File “D:\Program Files (x86)\Python\Python38\lib\site-packages\flask_wtf\recaptcha\fields.py”, line 3, in from . import widgets File “D:\Program Files (x86)\Python\Python38\lib\site-packages\flask_wtf\recaptcha\widgets.py”, line 5, in from werkzeug import url_encode ImportError: cannot import name ‘url_encode’ from ‘werkzeug’ (D:\Program Files (x86)\Python\Python38\lib\site-packages\werkzeug__init__.py)

尝试替换werkzeug的版本号为0.15.2 和0.16.0 都不行。


更多内容

williamfu 我换成了werkzeug-0.16.0后,不报这个错了,但报“ File "/usr/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py", line 861, in apply_driver_hacks info.database = os.path.join(app.root_path, info.database) AttributeError: can't set attribute”,难道是代码有问题?

小草 换一下python版本

小草 换一下python版本