Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Superset with SQLALCHEMY_IBMI : cannot import name 'Row' from 'sqlalchemy.engine' #146

Open
rh-igs opened this issue Jun 27, 2023 · 2 comments

Comments

@rh-igs
Copy link

rh-igs commented Jun 27, 2023

I have added Sqlalchemy_ibmi to Docker/requirements-local.txt

Now i get the following Error in superset:

2023-06-27 15:04:50 ######################################################################
2023-06-27 15:04:50
2023-06-27 15:04:50
2023-06-27 15:04:50 Init Step 1/4 [Starting] -- Applying DB migrations
2023-06-27 15:04:50
2023-06-27 15:04:50
2023-06-27 15:04:50 ######################################################################
2023-06-27 15:04:50
2023-06-27 14:47:13 File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module
2023-06-27 14:47:13 return _bootstrap._gcd_import(name[level:], package, level)
2023-06-27 14:47:13 File "", line 1030, in _gcd_import
2023-06-27 14:47:13 File "", line 1007, in _find_and_load
2023-06-27 14:47:13 File "", line 972, in _find_and_load_unlocked
2023-06-27 14:47:13 File "", line 228, in _call_with_frames_removed
2023-06-27 14:47:13 File "", line 1030, in _gcd_import
2023-06-27 14:47:13 File "", line 1007, in _find_and_load
2023-06-27 14:47:13 File "", line 972, in _find_and_load_unlocked
2023-06-27 14:47:13 File "", line 228, in _call_with_frames_removed
2023-06-27 14:47:13 File "", line 1030, in _gcd_import
2023-06-27 14:47:13 File "", line 1007, in _find_and_load
2023-06-27 14:47:13 File "", line 986, in _find_and_load_unlocked
2023-06-27 14:47:13 File "", line 680, in _load_unlocked
2023-06-27 14:47:13 File "", line 850, in exec_module
2023-06-27 14:47:13 File "", line 228, in _call_with_frames_removed
2023-06-27 14:47:13 File "/app/superset/init.py", line 21, in
2023-06-27 14:47:13 from superset.app import create_app
2023-06-27 14:47:13 File "/app/superset/app.py", line 23, in
2023-06-27 14:47:13 from superset.initialization import SupersetAppInitializer
2023-06-27 14:47:13 File "/app/superset/initialization/init.py", line 33, in
2023-06-27 14:47:13 from superset.extensions import (
2023-06-27 14:47:13 File "/app/superset/extensions/init.py", line 34, in
2023-06-27 14:47:13 from superset.utils.encrypt import EncryptedFieldFactory
2023-06-27 14:47:13 File "/app/superset/utils/encrypt.py", line 24, in
2023-06-27 14:47:13 from sqlalchemy.engine import Connection, Dialect, Row
2023-06-27 14:47:13 ImportError: cannot import name 'Row' from 'sqlalchemy.engine' (/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/init.py)
2023-06-27 15:04:50 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
2023-06-27 15:04:50 WARNING: You are using pip version 22.0.4; however, version 23.1.2 is available.
2023-06-27 15:04:50 You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
2023-06-27 15:04:53 Traceback (most recent call last):
2023-06-27 15:04:53 File "/usr/local/bin/superset", line 33, in
2023-06-27 15:04:53 sys.exit(load_entry_point('apache-superset', 'console_scripts', 'superset')())
2023-06-27 15:04:53 File "/usr/local/bin/superset", line 25, in importlib_load_entry_point
2023-06-27 15:04:53 return next(matches).load()
2023-06-27 15:04:53 File "/usr/local/lib/python3.9/importlib/metadata.py", line 86, in load
2023-06-27 15:04:53 module = import_module(match.group('module'))
2023-06-27 15:04:53 File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module
2023-06-27 15:04:53 return _bootstrap._gcd_import(name[level:], package, level)
2023-06-27 15:04:53 File "", line 1030, in _gcd_import
2023-06-27 15:04:53 File "", line 1007, in _find_and_load
2023-06-27 15:04:53 File "", line 972, in _find_and_load_unlocked
2023-06-27 15:04:53 File "", line 228, in _call_with_frames_removed
2023-06-27 15:04:53 File "", line 1030, in _gcd_import
2023-06-27 15:04:53 File "", line 1007, in _find_and_load
2023-06-27 15:04:53 File "", line 972, in _find_and_load_unlocked
2023-06-27 15:04:53 File "", line 228, in _call_with_frames_removed
2023-06-27 15:04:53 File "", line 1030, in _gcd_import
2023-06-27 15:04:53 File "", line 1007, in _find_and_load
2023-06-27 15:04:53 File "", line 986, in _find_and_load_unlocked
2023-06-27 15:04:53 File "", line 680, in _load_unlocked
2023-06-27 15:04:53 File "", line 850, in exec_module
2023-06-27 15:04:53 File "", line 228, in _call_with_frames_removed
2023-06-27 15:04:53 File "/app/superset/init.py", line 21, in
2023-06-27 15:04:53 from superset.app import create_app
2023-06-27 15:04:53 File "/app/superset/app.py", line 23, in
2023-06-27 15:04:53 from superset.initialization import SupersetAppInitializer
2023-06-27 15:04:53 File "/app/superset/initialization/init.py", line 33, in
2023-06-27 15:04:53 from superset.extensions import (
2023-06-27 15:04:53 File "/app/superset/extensions/init.py", line 34, in
2023-06-27 15:04:53 from superset.utils.encrypt import EncryptedFieldFactory
2023-06-27 15:04:53 File "/app/superset/utils/encrypt.py", line 24, in
2023-06-27 15:04:53 from sqlalchemy.engine import Connection, Dialect, Row
2023-06-27 15:04:53 ImportError: cannot import name 'Row' from 'sqlalchemy.engine' (/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/init.py)

I have installed Sqlalchemy Version 2.0.17 and Sqlalchemy_ibmi Version 0.9.2

In python i can connect to my IBMi with ibmi://user:password@hostname

@kadler
Copy link
Member

kadler commented Nov 29, 2023

sqlalchemy-ibmi doesn't yet support SQLAlchemy 2.0

@kadler
Copy link
Member

kadler commented Dec 14, 2023

Please try again with SQLAlchemy 1.4 and sqlalchemy-ibmi 0.9.3

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

No branches or pull requests

2 participants