Exception: Callable has no attribute __abc_registry
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Tái hiện lỗi bằng cách cài đặt SDK mới nhất với pip và import client hoặc typing.Optional từ test.py, sử dụng Python 3.7 hoặc Lambda như được mô tả. Xem xét hành vi của các dependency và PR #21; được xem là hoàn tất khi SDK import thành công trên Python 3.7 mà không gặp lỗi Callable __abc_registry.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Python
- Star
- 24
- Fork
- 42
- Merge trung bình
- 29 phút
- Pull request đã merge (30 ngày)
- 1
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của CyberSource/cybersource-rest-client-python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
loading configuration issue Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
CyberSource/cybersource-rest-client-python#177 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
CyberSource/cybersource-rest-client-python#168 · 2 bình luận ·
-
Python 3.12 getting urllib error Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
CyberSource/cybersource-rest-client-python#156 · 1 bình luận ·
Tất cả issue của CyberSource/cybersource-rest-client-python
Issue tương tự
-
[Bug] reef-hermes tells me to resume with hermes --resume, which does not work from my shell Đang mởarea: harness bug status: needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Human-Agent-Society/reef#625 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
learningequality/kolibri#15351 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Name consistency Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
eellak/triplestore#65 · 1 bình luận ·