gamegos / cesi

CeSI is a web interface for managing multiple supervisors from the same place.
GNU General Public License v3.0
571 stars 184 forks source link

cant't login #92

Open garywu520 opened 3 years ago

garywu520 commented 3 years ago

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

HuaTrung commented 3 years ago

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

beyond510 commented 3 years ago

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

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

HuaTrung commented 3 years ago

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 commented 1 year ago

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