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
OperationalError
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: user
[SQL: SELECT anon_1.user_id AS anon_1_user_id, anon_1.user_email AS anon_1_user_email, anon_1.user_username AS anon_1_user_username, anon_1.user_password AS anon_1_user_password, anon_1.user_last_login_at AS anon_1_user_last_login_at, anon_1.user_current_login_at AS anon_1_user_current_login_at, anon_1.user_last_login_ip AS anon_1_user_last_login_ip, anon_1.user_current_login_ip AS anon_1_user_current_login_ip, anon_1.user_login_count AS anon_1_user_login_count, anon_1.user_active AS anon_1_user_active, anon_1.user_fs_uniquifier AS anon_1_user_fs_uniquifier, anon_1.user_confirmed_at AS anon_1_user_confirmed_at, role_1.id AS role_1_id, role_1.name AS role_1_name, role_1.description AS role_1_description, role_1.permissions AS role_1_permissions
FROM (SELECT user.id AS user_id, user.email AS user_email, user.username AS user_username, user.password AS user_password, user.last_login_at AS user_last_login_at, user.current_login_at AS user_current_login_at, user.last_login_ip AS user_last_login_ip, user.current_login_ip AS user_current_login_ip, user.login_count AS user_login_count, user.active AS user_active, user.fs_uniquifier AS user_fs_uniquifier, user.confirmed_at AS user_confirmed_at
FROM user
WHERE lower(user.email) = lower(?)
LIMIT ? OFFSET ?) AS anon_1 LEFT OUTER JOIN (roles_users AS roles_users_1 JOIN role AS role_1 ON role_1.id = roles_users_1.role_id) ON anon_1.user_id = roles_users_1.user_id]
[parameters: ('test@me.com', 1, 0)]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
Steps to reproduce:
makayabou@domani:~/dev/flask_secure$ uname -a
Linux domani 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux
makayabou@domani:~/dev/flask_secure$ python3 --version
Python 3.9.2
makayabou@domani:~/dev/flask_secure$ python3 -m venv venv
makayabou@domani:~/dev/flask_secure$ source venv/bin/activate
(venv) makayabou@domani:~/dev/flask_secure$ pip install flask-security-too[common] sqlalchemy
Collecting flask-security-too[common]
(venv) makayabou@domani:~/dev/flask_secure$ pip show flask-security-too |grep Version
Version: 5.1.0
(venv) makayabou@domani:~/dev/flask_secure$ pip show Flask |grep Version
Version: 2.2.3
(venv) makayabou@domani:~/dev/flask_secure$ pip show sqlalchemy |grep Version
Version: 2.0.4
(venv) makayabou@domani:~/dev/flask_secure$ touch app.py models.py database.py
Then I just copy file content from doc as it is, and run flask run
thank you
The text was updated successfully, but these errors were encountered:
When I modified the quickstart to not use @before_first_request, which Flask deprecated, it broke flask run.
To run the sample: python app.py should work.
When changing from @app.before_first_request which Flask deprecated, the entire DB initial setup was placed in the __main__ block - thus using flask run to start the examples didn't work.
closes#759
When changing from @app.before_first_request which Flask deprecated, the entire DB initial setup was placed in the __main__ block - thus using flask run to start the examples didn't work.
closes#759
I followed Basic SQL Alchemy Application with Session in Quickstart session of doc at https://flask-security-too.readthedocs.io/en/stable/quickstart.html#basic-sqlalchemy-application-with-session , and when I started my app I could access login page but after login with test user, I'm redirected to an error page saying:
Steps to reproduce:
Then I just copy file content from doc as it is, and run
flask run
thank you
The text was updated successfully, but these errors were encountered: