Exception: Callable has no attribute __abc_registry
还没有人认领这个 Issue。
评估
调研方向
按照描述使用 Python 3.7 或 Lambda,通过 pip 安装最新的 SDK,并从 test.py 导入 client 或 typing.Optional,以重现该故障。检查依赖项的行为和 PR #21;完成的标准是 SDK 能够在 Python 3.7 上成功导入,且不出现 Callable __abc_registry 错误。
由索引模型根据 Issue 内容生成。
描述
Expected Behavior
Cybersource-REST-Client-Python should work with the Python 3.7.
Actual Behavior
Users receive a Callable has no attribute __abc_registry error.
This is a known issue when installing typing on a system that has Python > 3.6 because typing is in the standard library since version 3.5. Importing typing with Python 3.7 fails.
Cloudwatch Log
[ERROR] AttributeError: type object 'Callable' has no attribute '_abc_registry'
Traceback (most recent call last):
File "/var/lang/lib/python3.7/imp.py", line 234, in load_module
return load_source(name, filename, file)
File "/var/lang/lib/python3.7/imp.py", line 171, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 696, in _load
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/var/task/app.py", line 4, in <module>
from typing import Optional
File "/var/task/typing.py", line 1347, in <module>
class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
File "/var/task/typing.py", line 1003, in __new__
self._abc_registry = extra._abc_registry
Steps to Reproduce the Problem
- Installed the latest available version of the SDK through pip so it will install all required dependencies too.
- Create a test.py file and import the Cybersource SDK in an environment with Python > 3.5.
- Execute the script python or upload the code to Lambda and run it.
Suggestion for Fix
Opened a PR here: https://github.com/CyberSource/cybersource-rest-client-python/pull/21
- 主要语言
- Python
- 星标
- 24
- 派生
- 42
- 平均合并
- 3 天 18 小时
- 30 天内合并 PR
- 1
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CyberSource/cybersource-rest-client-python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
-
loading configuration issue可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 64/100
CyberSource/cybersource-rest-client-python#177 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 55/100
-
难度 3/5 1-2 天 新手友好度 35/100
CyberSource/cybersource-rest-client-python#168 · 2 条评论 ·
-
难度 3/5 1-2 天 新手友好度 35/100
CyberSource/cybersource-rest-client-python#156 · 1 条评论 ·
查看 CyberSource/cybersource-rest-client-python 的全部 Issue
相似的 Issue
-
bug Triage-Needed
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
FuRongJun-1999/dsh-memory#170 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
521xueweihan/HelloGitHub#3940 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100