You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently writing a simple flask app and wanted to try the app with a sqlite database. After creating the models and all the boilerplate for the database, I run the command:
flask db init
which throws the following error:
Traceback (most recent call last):
File "/home/jobenas/.local/lib/python3.8/site-packages/flask/cli.py", line 256, in locate_app
__import__(module_name)
File "/mnt/c/Users/joben/personal_dev/Python/pucp_provision_system/server.py", line 15, in <module>
from base.routes import login_manager
File "/mnt/c/Users/joben/personal_dev/Python/pucp_provision_system/base/routes.py", line 9, in <module>
from base.forms import LoginForm, RegisterUserForm, RegisterUserFormAdmin
File "/mnt/c/Users/joben/personal_dev/Python/pucp_provision_system/base/forms.py", line 1, in <module>
from flask_wtf import FlaskForm
File "/home/jobenas/.local/lib/python3.8/site-packages/flask_wtf/__init__.py", line 17, in <module>
from .recaptcha import *
File "/home/jobenas/.local/lib/python3.8/site-packages/flask_wtf/recaptcha/__init__.py", line 2, in <module>
from .fields import *
File "/home/jobenas/.local/lib/python3.8/site-packages/flask_wtf/recaptcha/fields.py", line 3, in <module>
from . import widgets
File "/home/jobenas/.local/lib/python3.8/site-packages/flask_wtf/recaptcha/widgets.py", line 5, in <module>
from werkzeug import url_encode
ImportError: cannot import name 'url_encode' from 'werkzeug' (/home/jobenas/.local/lib/python3.8/site-packages/werkzeug/__init__.py)
I'm currently running:
Werkzeug version 2.0.1
Flask-Migrate version 3.1.0
Flask-SQLAlchemy version 2.5.1
Flask version 2.0.1
I'm not sure if there's any other dependency needed to run this. Thanks in advance for any pointers.
PS: Sorry for the horrible formatting, I'm not very knowledgeable with markdown.
The text was updated successfully, but these errors were encountered:
Hi Miguel, thanks for the reply, I'm on version 2.3.3 of WTForms and version 0.15.1 Flask-WTF package, which I understand is the latest version. Is there any version that's recommended for werkzeug version 2?
You need to check your versions, something isn't right in what you are reporting. The line that is giving you the error is different in the current release of Flask-WTF (here). Try reinstalling Flask-WTF.
Hi:
I'm currently writing a simple flask app and wanted to try the app with a sqlite database. After creating the models and all the boilerplate for the database, I run the command:
flask db init
which throws the following error:
I'm currently running:
Werkzeug version 2.0.1
Flask-Migrate version 3.1.0
Flask-SQLAlchemy version 2.5.1
Flask version 2.0.1
I'm not sure if there's any other dependency needed to run this. Thanks in advance for any pointers.
PS: Sorry for the horrible formatting, I'm not very knowledgeable with markdown.
The text was updated successfully, but these errors were encountered: