aws / aws/amazon-redshift-python-driver

PackageNotFoundError: scramp when using redshift_connector library in glue

未关闭
#219 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
220
派生
86
PR 合并指标
30 天内没有已合并 PR

描述

In aws glue shell job , i am using a wheel file which has all the libraries needed for aws wrangler, redshift-connector and i do see scramp library part of the wheel file. However when i install this wheel during glue python shell job i am getting the following error event though scramp library is installed.

Glue python version 3.9
aws wrangler version = 3.7.3
redshift-connector version = 2.1.1

I am trying to connect to redshift serverless using the above libraries and here

`

from redshift_connector.core import BINARY, Connection, Cursor File "/glue/lib/installation/redshift_connector/core.py", line 18, in | from redshift_connector.core import BINARY, Connection, Cursor File "/glue/lib/installation/redshift_connector/core.py", line 18, in
-- | --

from scramp import ScramClient # type: ignore File "/glue/lib/installation/scramp/__init__.py", line 12, in |

__version__ = version("scramp") File "/.pyenv/versions/3.9.10/lib/python3.9/importlib/metadata.py", line 560, in version |  
 
return Distribution.from_name(distribution_name) File "/.pyenv/versions/3.9.10/lib/python3.9/importlib/metadata.py",

"/.pyenv/versions/3.9.10/lib/python3.9/importlib/metadata.py", line 187, in from_name

raise PackageNotFoundError(name) importlib.metadata.PackageNotFoundError: scramp

`

贡献指南

打开贡献指南

调研方向

首先,使用 aws wrangler 3.7.3、redshift-connector 2.1.1 和提供的 wheel 复现 Glue Python 3.9 安装。检查 redshift_connector/core.py、scramp/__init__.py 以及 Python 的 importlib.metadata 查找逻辑,将已安装的文件与分发元数据进行比较。当 connector 能够成功导入并可以继续进行报告中的 Redshift Serverless 连接时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
aws, python
领域
databases
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。