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
Traceback (most recent call last):
File "/Users/robin/mambaforge/envs/sandman/bin/sandman2ctl", line 5, in <module>
from sandman2.__main__ import main
File "/Users/robin/mambaforge/envs/sandman/lib/python3.8/site-packages/sandman2/__init__.py", line 2, in <module>
from sandman2.app import get_app, db, AutomapModel
File "/Users/robin/mambaforge/envs/sandman/lib/python3.8/site-packages/sandman2/app.py", line 18, in <module>
from sandman2.service import Service
File "/Users/robin/mambaforge/envs/sandman/lib/python3.8/site-packages/sandman2/service.py", line 12, in <module>
from sandman2.model import db
File "/Users/robin/mambaforge/envs/sandman/lib/python3.8/site-packages/sandman2/model.py", line 13, in <module>
db = SQLAlchemy()
File "/Users/robin/mambaforge/envs/sandman/lib/python3.8/site-packages/flask_sqlalchemy/__init__.py", line 715, in __init__
self.session = self.create_scoped_session(session_options)
File "/Users/robin/mambaforge/envs/sandman/lib/python3.8/site-packages/flask_sqlalchemy/__init__.py", line 748, in create_scoped_session
scopefunc = options.pop('scopefunc', _app_ctx_stack.__ident_func__)
AttributeError: 'LocalStack' object has no attribute '__ident_func__'
After some Googling, I found that it might be a version issue with the latest version of werkzeug and the pinned version of flask-sqlalchemy (which was 2.4.0). Upgrading to the latest flask-sqlalchemy (2.5.1 currently) seems to fix it.
Shall I submit a PR to update setup.py to use the latest flask-sqlalchemy, or might be there be more to this that I'm missing?
The text was updated successfully, but these errors were encountered:
Any updates here? I still see 2.4 in the code and I think I have the same issue. Only difference is for me it is a _FakeStack object missing that attribute. AttributeError: '_FakeStack' object has no attribute '__ident_func__'
Any updates here? I still see 2.4 in the code and I think I have the same issue. Only difference is for me it is a _FakeStack object missing that attribute. AttributeError: '_FakeStack' object has no attribute '__ident_func__'
update Flask-SQLAlchemy works for me. ( the solution I looked at StackOverFlow) pip install Flask-SQLAlchemy==2.5.1
After installing sandman2 in a clean environment, I ran it as follows:
(using the chinook sample database from here).
I get the following error:
After some Googling, I found that it might be a version issue with the latest version of werkzeug and the pinned version of flask-sqlalchemy (which was 2.4.0). Upgrading to the latest flask-sqlalchemy (2.5.1 currently) seems to fix it.
Shall I submit a PR to update setup.py to use the latest flask-sqlalchemy, or might be there be more to this that I'm missing?
The text was updated successfully, but these errors were encountered: