Exception: Callable has no attribute __abc_registry
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 25/100
Línea de trabajo
Reproduce el fallo instalando el SDK más reciente con pip e importando el client o typing.Optional desde test.py, usando Python 3.7 o Lambda como se describe. Revisa el comportamiento de las dependencias y PR #21; se considera terminado cuando el SDK se importa correctamente en Python 3.7 sin el error Callable __abc_registry.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Python
- Estrellas
- 24
- Forks
- 42
- Merge medio
- 3 d 18 h
- PR fusionados (30 d)
- 1
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de CyberSource/cybersource-rest-client-python
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
loading configuration issuePosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
CyberSource/cybersource-rest-client-python#177 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
CyberSource/cybersource-rest-client-python#168 · 2 comentarios ·
-
Python 3.12 getting urllib errorAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
CyberSource/cybersource-rest-client-python#156 · 1 comentario ·
Todos los issues de CyberSource/cybersource-rest-client-python
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 60/100
521xueweihan/HelloGitHub#3924 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
wilbowes/EchoMuse#869 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
-
Claiming namespace `jft63`Abiertonamespace operations
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
EclipseFdn/open-vsx.org#14043 ·
Los mantenedores suelen responder en 1 día
-
test: TestServeUntilStale races the server's close against the client's sendall (BrokenPipeError under load)Posiblemente ocupada @evoludigit la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 89/100
Los mantenedores suelen responder en 1 día