GitHub user prayaagmahajan created a discussion: Getting SQLA import error from 
flask-appbuilder after airflow 3.1.2

Hi Team,

I am trying to upgrade my airflow instance from **2.10.3 -> 3.1.2** but in the 
process I am getting an error 

`WARNING - cannot import name 'SQLA' from 'flask_appbuilder' 
(/usr/local/lib/python3.11/site-packages/flask_appbuilder/__init__.py)
2025-11-14_09:52:41.84415 Traceback (most recent call last):
2025-11-14_09:52:41.84421   File 
"/usr/local/lib/python3.11/site-packages/airflow/configuration.py", line 1264, 
in getimport
2025-11-14_09:52:41.84484     return import_string(full_qualified_path)
2025-11-14_09:52:41.84500            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-11-14_09:52:41.84518   File 
"/usr/local/lib/python3.11/site-packages/airflow/utils/module_loading.py", line 
41, in import_string
2025-11-14_09:52:41.84547     module = import_module(module_path)
2025-11-14_09:52:41.84571              ^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-11-14_09:52:41.84586   File "/usr/lib64/python3.11/importlib/__init__.py", 
line 126, in import_module
2025-11-14_09:52:41.84614     return _bootstrap._gcd_import(name[level:], 
package, level)
2025-11-14_09:52:41.84625            
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-11-14_09:52:41.84631   File "<frozen importlib._bootstrap>", line 1204, in 
_gcd_import
2025-11-14_09:52:41.84639   File "<frozen importlib._bootstrap>", line 1176, in 
_find_and_load
2025-11-14_09:52:41.84650   File "<frozen importlib._bootstrap>", line 1147, in 
_find_and_load_unlocked
2025-11-14_09:52:41.84664   File "<frozen importlib._bootstrap>", line 690, in 
_load_unlocked
2025-11-14_09:52:41.84672   File "<frozen importlib._bootstrap_external>", line 
940, in exec_module
2025-11-14_09:52:41.84680   File "<frozen importlib._bootstrap>", line 241, in 
_call_with_frames_removed
2025-11-14_09:52:41.84688   File 
"/usr/local/lib/python3.11/site-packages/airflow/providers/fab/auth_manager/fab_auth_manager.py",
 line 71, in <module>
2025-11-14_09:52:41.84706     from airflow.providers.fab.www.app import 
create_app
2025-11-14_09:52:41.84719   File 
"/usr/local/lib/python3.11/site-packages/airflow/providers/fab/www/app.py", 
line 24, in <module>
2025-11-14_09:52:41.84739     from flask_appbuilder import SQLA
2025-11-14_09:52:41.84751 ImportError: cannot import name 'SQLA' from 
'flask_appbuilder'`

when I checked the constraints file for 3.11 its clearly mentioned to use 
flask-appbuilder==5.0.0 but seems SQLA is been removed in this version and I am 
stuck at this point.

can someone please help us out of this issue. any help will be appreciated.

Thanks

**Resources links followed**:
fab provider app.py: 
https://github.com/apache/airflow/blob/3.1.3rc1/providers/fab/src/airflow/providers/fab/www/app.py
Fab provider pypi link: https://pypi.org/project/apache-airflow-providers-fab/

GitHub link: https://github.com/apache/airflow/discussions/58308

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to