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

ModuleNotFoundError: No module named 'sqlalchemy.sql.roles' #85

Open
cobolbaby opened this issue Nov 15, 2021 · 3 comments
Open

ModuleNotFoundError: No module named 'sqlalchemy.sql.roles' #85

cobolbaby opened this issue Nov 15, 2021 · 3 comments

Comments

@cobolbaby
Copy link

cobolbaby commented Nov 15, 2021

from data_lineage import Analyze, Catalog

...
Traceback (most recent call last):
  File "/opt/workspace/anaconda2/envs/tf21/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/opt/workspace/anaconda2/envs/tf21/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/cobolbaby/.vscode/extensions/ms-python.python-2021.11.1422169775/pythonFiles/lib/python/debugpy/__main__.py", line 45, in <module>
    cli.main()
  File "/home/cobolbaby/.vscode/extensions/ms-python.python-2021.11.1422169775/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 444, in main
    run()
  File "/home/cobolbaby/.vscode/extensions/ms-python.python-2021.11.1422169775/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 285, in run_file
    runpy.run_path(target_as_str, run_name=compat.force_str("__main__"))
  File "/opt/workspace/anaconda2/envs/tf21/lib/python3.6/runpy.py", line 263, in run_path
    pkg_name=pkg_name, script_name=fname)
  File "/opt/workspace/anaconda2/envs/tf21/lib/python3.6/runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "/opt/workspace/anaconda2/envs/tf21/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/media/cobolbaby/data/ubuntu/opt/workspace/git/lineage/analyse.py", line 3, in <module>
    from data_lineage import Analyze, Catalog
  File "/opt/workspace/anaconda2/envs/tf21/lib/python3.6/site-packages/data_lineage/__init__.py", line 10, in <module>
    from dbcat.catalog.models import JobExecutionStatus
  File "/opt/workspace/anaconda2/envs/tf21/lib/python3.6/site-packages/dbcat/__init__.py", line 7, in <module>
    from dbcat.catalog import Catalog
  File "/opt/workspace/anaconda2/envs/tf21/lib/python3.6/site-packages/dbcat/catalog/__init__.py", line 3, in <module>
    from .catalog import Catalog
  File "/opt/workspace/anaconda2/envs/tf21/lib/python3.6/site-packages/dbcat/catalog/catalog.py", line 9, in <module>
    from dbcat.catalog.models import (
  File "/opt/workspace/anaconda2/envs/tf21/lib/python3.6/site-packages/dbcat/catalog/models.py", line 5, in <module>
    from snowflake.sqlalchemy import URL
  File "/opt/workspace/anaconda2/envs/tf21/lib/python3.6/site-packages/snowflake/sqlalchemy/__init__.py", line 25, in <module>
    from . import base, snowdialect
  File "/opt/workspace/anaconda2/envs/tf21/lib/python3.6/site-packages/snowflake/sqlalchemy/base.py", line 17, in <module>
    from .custom_commands import AWSBucket, AzureContainer, ExternalStage
  File "/opt/workspace/anaconda2/envs/tf21/lib/python3.6/site-packages/snowflake/sqlalchemy/custom_commands.py", line 14, in <module>
    from sqlalchemy.sql.roles import FromClauseRole
ModuleNotFoundError: No module named 'sqlalchemy.sql.roles'
@vrajat
Copy link
Member

vrajat commented Nov 20, 2021

This might be due to snowflake-sqlalchemy. Reference: snowflakedb/snowflake-sqlalchemy#234

Can you tell me which of version of snowflake-sqlalchemy is installed?

@cobolbaby
Copy link
Author

$ pip list | grep snowflake-sqlalchemy
snowflake-sqlalchemy       1.3.2

@vrajat
Copy link
Member

vrajat commented Jan 2, 2022

Can you force install snowflake-sqlalchemy==1.2.4?

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