Error when importing flask_graphql
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 25/100
Piste de recherche
Commencez par reproduire l’import avec les versions de requirements.txt sous Python 3.10. Inspectez les chemins flask_graphql/init.py, blueprint.py, graphqlview.py et graphql_server/init.py mentionnés dans la trace d’exécution ; c’est terminé lorsque l’import signalé réussit sans l’erreur MutableMapping et que le chemin de test ou de démarrage de l’application concerné réussit.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Unable to import this library into my project. I always get an ImportError even if I create a new project with only one import.
My code api.py
from http.client import HTTPException
from multiprocessing import AuthenticationError
import os
from flask import Flask, request, jsonify, abort
from sqlalchemy import exc
import json
from flask_cors import CORS
from graphene import ObjectType, String, Schema
from flask_graphql import GraphQLView
app = Flask(__name__)
My requirements.txt
In the beginning, I specify the version of each library, but there was an error. To solve the error, I removed the FLask-GraphQL because it is in conflict with other graphene dependency. As it said, could not import flask_graphql I remove graphene version and specify the last version in the Flask-GraphQL so that my project use the last version of this library and solve the dependency conflict with graphene. But always the same error.
Flask == 2.2.2
Flask-SQLAlchemy == 3.0.2
Jinja2 == 3.1.2
pylint == 2.15.9
Flask-Cors == 3.0.10
graphene #For graphql python support
Flask-GraphQL == 2.0.1
Error message
Error: While importing 'src.api', an ImportError was raised:
Traceback (most recent call last):
File "/home/sticlab/Documents/NotebookProject/rasa-car-location-services/backend/venv/lib/python3.10/site-packages/flask/cli.py", line 218, in locate_app
__import__(module_name)
File "/home/sticlab/Documents/NotebookProject/rasa-car-location-services/backend/src/api.py", line 9, in <module>
from flask_graphql import GraphQLView
File "/home/sticlab/Documents/NotebookProject/rasa-car-location-services/backend/venv/lib/python3.10/site-packages/flask_graphql/__init__.py", line 1, in <module>
from .blueprint import GraphQL
File "/home/sticlab/Documents/NotebookProject/rasa-car-location-services/backend/venv/lib/python3.10/site-packages/flask_graphql/blueprint.py", line 5, in <module>
from .graphqlview import GraphQLView
File "/home/sticlab/Documents/NotebookProject/rasa-car-location-services/backend/venv/lib/python3.10/site-packages/flask_graphql/graphqlview.py", line 7, in <module>
from graphql_server import (HttpQueryError, default_format_error,
File "/home/sticlab/Documents/NotebookProject/rasa-car-location-services/backend/venv/lib/python3.10/site-packages/graphql_server/__init__.py", line 2, in <module>
from collections import namedtuple, MutableMapping
ImportError: cannot import name 'MutableMapping' from 'collections' (/usr/lib/python3.10/collections/__init__.py)
- Langage dominant
- Python
- Étoiles
- 1.3k
- Forks
- 138
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de graphql-python/flask-graphql
-
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
-
which graphiql version is using?Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 35/100
graphql-python/flask-graphql#85 · 2 commentaires · 1 réaction ·
-
CSRF Exemption?Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 25/100
graphql-python/flask-graphql#84 · 1 commentaire ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
graphql-python/flask-graphql#80 · 9 commentaires · 2 réactions ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 35/100
Toutes les issues de graphql-python/flask-graphql
Issues similaires
-
request-theme
Difficulté 2/5 Moins d'une heure Accessibilité débutants 70/100
LizardByte/ThemerrDB#8877 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
area/install-update comp/gateway P0 sweeper:risk-compatibility type/bug
Difficulté 2/5 Moins d'une heure Accessibilité débutants 72/100
NousResearch/hermes-agent#135997 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
deepset-ai/haystack#13199 ·
Les mainteneurs répondent en général sous 1 jour
-
[BUG] JSONLoader rejects valid UTF-8 BOM filesPeut-être pris @zouyonghe l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
anthropics/knowledge-work-plugins#1298 ·
Les mainteneurs répondent en général sous 1 jour