小编Eti*_*aut的帖子

ImportError:无法从“sqlalchemy.engine.url”导入名称“_rfc_1738_quote”

我正在使用以下包中的 python 雪花连接器:snowflake-sqlalchemy

from sqlalchemy import create_engine
engine = create_engine(...)
Run Code Online (Sandbox Code Playgroud)

它曾经有效,但现在因这个奇怪的错误而失败。

我尝试切换到旧版本的软件包,但无法消除此错误。

这是完整的堆栈跟踪:

  File "/Users/Etienne.Herlaut/Repositories/python/performance-hub-apps/utils/snowflake.py", line 19, in get_snowflake_connection
    engine = create_engine(f'snowflake://{sf_user}:{sf_password}@{sf_account}?warehouse={wh}&role={role}', connect_args={'timeout': 120})
  File "<string>", line 2, in create_engine
    
  File "/Users/Etienne.Herlaut/.pyenv/versions/3.8.13/lib/python3.8/site-packages/sqlalchemy/util/deprecations.py", line 309, in warned
    return fn(*args, **kwargs)
  File "/Users/Etienne.Herlaut/.pyenv/versions/3.8.13/lib/python3.8/site-packages/sqlalchemy/engine/create.py", line 522, in create_engine
    entrypoint = u._get_entrypoint()
  File "/Users/Etienne.Herlaut/.pyenv/versions/3.8.13/lib/python3.8/site-packages/sqlalchemy/engine/url.py", line 656, in _get_entrypoint
    cls = registry.load(name)
  File "/Users/Etienne.Herlaut/.pyenv/versions/3.8.13/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 341, in load
    return impl.load()
  File "/Users/Etienne.Herlaut/.pyenv/versions/3.8.13/lib/python3.8/site-packages/importlib_metadata/__init__.py", line 207, in load
    module = import_module(match.group('module'))
  File "/Users/Etienne.Herlaut/.pyenv/versions/3.8.13/lib/python3.8/importlib/__init__.py", line 127, in …
Run Code Online (Sandbox Code Playgroud)

python sqlalchemy python-3.x

6
推荐指数
1
解决办法
5612
查看次数

标签 统计

python ×1

python-3.x ×1

sqlalchemy ×1