Skip to content

Pin sqlalchemy<2.0 to fix startup crash with Flask-SQLAlchemy 2.5.1#60

Merged
k9ert merged 1 commit intocryptoadvance:masterfrom
al-munazzim:fix-sqlalchemy-version-pin
Feb 1, 2026
Merged

Pin sqlalchemy<2.0 to fix startup crash with Flask-SQLAlchemy 2.5.1#60
k9ert merged 1 commit intocryptoadvance:masterfrom
al-munazzim:fix-sqlalchemy-version-pin

Conversation

@al-munazzim
Copy link
Contributor

Problem

Specter Desktop crashes on startup with:

AttributeError: module 'sqlalchemy' has no attribute '__all__'

Traceback: flask_sqlalchemy/__init__.py:112 in _include_sqlalchemyfor key in module.__all__

Root Cause

Flask-SQLAlchemy==2.5.1 uses _include_sqlalchemy() which iterates over sqlalchemy.__all__. SQLAlchemy 2.0 removed __all__, breaking this function.

The current requirements.txt on master pins sqlalchemy==2.0.30, which is incompatible with Flask-SQLAlchemy==2.5.1. The released version (0.6.7) has sqlalchemy>=1.4.42 with no upper bound, so pip can resolve to 2.x on fresh installs.

Fix

Pin sqlalchemy>=1.4.42,<2.0 until 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).

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.
@k9ert k9ert merged commit 407f694 into cryptoadvance:master Feb 1, 2026
0 of 2 checks passed
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 this pull request may close these issues.

2 participants