Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant't login #92

Open
garywu520 opened this issue Mar 18, 2021 · 4 comments · May be fixed by #115
Open

cant't login #92

garywu520 opened this issue Mar 18, 2021 · 4 comments · May be fixed by #115

Comments

@garywu520
Copy link

The account password is correct, it seems that the database is empty and cannot be logged in

@HuaTrung
Copy link

I think you need to upgrade flask-sqlalchemy lib. I fixed it.

@beyond510
Copy link

I think you need to upgrade flask-sqlalchemy lib. I fixed it.

so...how to do???
"pip install -U Flask-SQLAlchemy"

@HuaTrung
Copy link

just remove specific version from requirement.txt
flask==1.1.2 flask-sqlalchemy psycopg2-binary==2.8.5 pymysql==0.9.3 tomlkit==0.5.11

@shouldsee
Copy link

shouldsee commented Sep 28, 2022

I am using flask-sqlalchemy==2.4.3 and the code to set database needs fixing... Seemingly this is a bug from flask_sqlalchemy

    self._sa.apply_driver_hacks(self._app, sa_url, options)
  File "/root/miniconda3/lib/python3.8/site-packages/flask_sqlalchemy/__init__.py", line 914, in apply_driver_hacks
    sa_url.database = os.path.join(app.root_path, sa_url.database)
AttributeError: can't set attribute

So the best thing to do is to upgrade to a version without bug... I am currently using a patched requirements.txt like

flask==1.1.2
flask-sqlalchemy==2.5.1
psycopg2-binary==2.8.5
pymysql==0.9.3
tomlkit==0.5.11
itsdangerous==2.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@shouldsee @HuaTrung @garywu520 @beyond510 and others