Pin sqlalchemy<2.0 to fix startup crash with Flask-SQLAlchemy 2.5.1#60
Merged
k9ert merged 1 commit intocryptoadvance:masterfrom Feb 1, 2026
Merged
Conversation
Flask-SQLAlchemy 2.5.1 uses _include_sqlalchemy() which iterates over sqlalchemy.__all__, but SQLAlchemy 2.0 removed __all__. This causes an AttributeError crash on startup: AttributeError: module 'sqlalchemy' has no attribute '__all__' The previous pin (==2.0.30) was incompatible with Flask-SQLAlchemy 2.5.1. Pin to <2.0 until Flask-SQLAlchemy is upgraded to 3.x.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Specter Desktop crashes on startup with:
Traceback:
flask_sqlalchemy/__init__.py:112in_include_sqlalchemy→for key in module.__all__Root Cause
Flask-SQLAlchemy==2.5.1uses_include_sqlalchemy()which iterates oversqlalchemy.__all__. SQLAlchemy 2.0 removed__all__, breaking this function.The current
requirements.txton master pinssqlalchemy==2.0.30, which is incompatible withFlask-SQLAlchemy==2.5.1. The released version (0.6.7) hassqlalchemy>=1.4.42with no upper bound, so pip can resolve to 2.x on fresh installs.Fix
Pin
sqlalchemy>=1.4.42,<2.0until Flask-SQLAlchemy is upgraded to 3.x.Reported
Users hitting this on Raspberry Pi (RaspiBlitz) with fresh pip installs. See: raspiblitz/raspiblitz#5224 (related startup issues).