AttributeError: partially initialized module 'graphene' has no attribute 'ObjectType' (most likely due to a circular import)
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
Comienza con el traceback y el ejemplo mínimo de Python del issue, prestando atención al punto de entrada local v4/graphql.py y a la cadena de importación de graphene. Comprueba si el comportamiento informado puede reproducirse en el entorno Python 3.9.7 indicado; la tarea está terminada cuando se haya identificado si se trata de un error de Graphene o de un problema específico de la estructura de módulos del ejemplo.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Note: for support questions, please use stackoverflow. This repository's issues are reserved for feature requests and bug reports.
- What is the current behavior?
File "/Users/noj/recurrency/legacy-api/v4/graphql.py", line 1, in <module>
import graphene
File "/opt/homebrew/lib/python3.9/site-packages/graphene/__init__.py", line 3, in <module>
from .types import (
File "/opt/homebrew/lib/python3.9/site-packages/graphene/types/__init__.py", line 2, in <module>
from graphql import ResolveInfo
File "/Users/noj/recurrency/legacy-api/v4/graphql.py", line 3, in <module>
class Query(graphene.ObjectType):
AttributeError: partially initialized module 'graphene' has no attribute 'ObjectType' (most likely due to a circular import)
- If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
a github repo, https://repl.it or similar.
import graphene
class Query(graphene.ObjectType):
hello = graphene.String(description='A typical hello world')
def resolve_hello(self, info):
return 'World'
schema = graphene.Schema(query=Query)
if __name__ == "__main__":
query = '''
query SayHello {
hello
}
'''
result = schema.execute(query)
print (result)
- What is the expected behavior?
No errors.
-
Please tell us about your environment:
- Version: Python 3.9.7
- Platform: Mac
-
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow)
- Lenguaje dominante
- Python
- Estrellas
- 8.2k
- Forks
- 818
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
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 graphql-python/graphene
-
Tutorial mistakes Abierto🐛 bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
graphql-python/graphene#1389 · 5 comentarios · 2 reacciones ·
-
Support OneOf input object types Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
graphql-python/graphene#1606 ·
-
Python 3.14 support Abierto✨ enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 38/100
graphql-python/graphene#1601 · 2 comentarios ·
-
✨ enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
graphql-python/graphene#1600 ·
-
🐛 bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 55/100
graphql-python/graphene#1593 ·
Todos los issues de graphql-python/graphene
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
-
hcocena Abiertopolicies-accepted pre-review precheck-passed
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Bioconductor/BiocContributions#214 · 5 comentarios ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
TencentCloud/Octop#1169 · 1 comentario ·
-
[开源推荐] 在老板拷问你之前,先让 AI 灵魂拷问你 Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
521xueweihan/HelloGitHub#3778 ·
-
The version checker's trailing attribute region has no control for a less-than inside a quoted value Abiertoarea: dashboard area: tests bug perceived difficulty: 2 python
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Nitjsefnie-Harness-Commons/daedalus#1105 · 1 comentario ·