Hello,
I'm seeing the following error after installing Flask-Security and changing a data-type in my databse from varchar(255) to db.Text in db.Model and longtext in the sql table:
2024-11-04 22:44:12,901: Error running WSGI application
2024-11-04 22:44:12,901: ImportError: cannot import name '_app_ctx_stack' from 'flask' (/home/kpuln/.local/lib/python3.10/site-packages/flask/__init__.py)
2024-11-04 22:44:12,902: File "/var/www/kpuln_pythonanywhere_com_wsgi.py", line 16, in <module>
2024-11-04 22:44:12,902: from flask_app import app as application # noqa
2024-11-04 22:44:12,902:
2024-11-04 22:44:12,902: File "/home/kpuln/mysite/flask_app.py", line 12, in <module>
2024-11-04 22:44:12,902: from flask_sqlalchemy import SQLAlchemy
2024-11-04 22:44:12,902:
2024-11-04 22:44:12,902: File "/usr/local/lib/python3.10/site-packages/flask_sqlalchemy/__init__.py", line 14, in <module>
2024-11-04 22:44:12,902: from flask import _app_ctx_stack, abort, current_app, request**
A Google search revealed that the issue could be with Flask, Werkzeug and Flask-SQLAlchemy.
So I rolled Flask-SQLAlchemy back to 2.5.1 from 3.1.1
I also rolled back Werkzeug from 3.1.1 to 2.1.2, which was upgraded to 3.1.1 after the Flask-Security module was installed.
and I rolled back Flask from 3.0.3 to 2.1.2, which was also upgraded to 3.0.3 after the Flask-Security module was installed.
Any suggestions on how I can resolve this issue AND work with Flask-Security..?
Thanks,
kpuln