Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name 'get_default_backend' #1086

Closed
mikkokotila opened this issue Oct 18, 2019 · 9 comments
Closed

ImportError: cannot import name 'get_default_backend' #1086

mikkokotila opened this issue Oct 18, 2019 · 9 comments
Labels

Comments

@mikkokotila
Copy link

In a fresh env I get the below:

Mikkos-Air:Studio-Stream mikko$ python app.py
Traceback (most recent call last):
  File "app.py", line 3, in <module>
    from flask_graphql import GraphQLView
  File "/Users/mikko/miniconda3/lib/python3.6/site-packages/Flask_GraphQL-2.0.0-py3.6.egg/flask_graphql/__init__.py", line 1, in <module>
    from .blueprint import GraphQL
  File "/Users/mikko/miniconda3/lib/python3.6/site-packages/Flask_GraphQL-2.0.0-py3.6.egg/flask_graphql/blueprint.py", line 5, in <module>
    from .graphqlview import GraphQLView
  File "/Users/mikko/miniconda3/lib/python3.6/site-packages/Flask_GraphQL-2.0.0-py3.6.egg/flask_graphql/graphqlview.py", line 7, in <module>
    from graphql_server import (HttpQueryError, default_format_error,
  File "/Users/mikko/miniconda3/lib/python3.6/site-packages/graphql_server_core-1.1.1-py3.6.egg/graphql_server/__init__.py", line 5, in <module>
    from graphql import get_default_backend
ImportError: cannot import name 'get_default_backend'
@mikkokotila
Copy link
Author

mikkokotila commented Oct 18, 2019

Workaround is to:

pip install graphql-core==2.2.1
pip install graphene==2.1.8

@jkimbo
Copy link
Member

jkimbo commented Oct 19, 2019

@mikkokotila the new version of graphql-core v3 removes the backend feature that was present in v2. It looks like Flask GraphQL needs to update it's dependencies so that it's not including a version of graphql-core it doesn't support.

@jkimbo
Copy link
Member

jkimbo commented Oct 19, 2019

Ah looks like I've already created a PR for this which I have forgotten about! graphql-python/flask-graphql#60 I'll try and bring it up to date.

@babaMar
Copy link

babaMar commented Dec 2, 2019

Experiencing the same problem, any other suggested solution other than waiting the PR to be merged?

@babaMar
Copy link

babaMar commented Dec 3, 2019

@jkimbo I see Travis builds were failing, so I created graphql-python/flask-graphql#65

@ivancarrancho
Copy link

Please mix it guys graphql-python/flask-graphql#65
Thanks @babaMar

@stale
Copy link

stale bot commented Mar 2, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 2, 2020
@jkimbo
Copy link
Member

jkimbo commented Mar 14, 2020

Looks like this issue has been fixed in flask-graphql

@milliegibbons
Copy link

I am get this error stated here when using these packages:
openai and graphene_federation I need features in those versions.
Every combination seems to give dependency conflict.

openai==1.3.5
aiohttp==3.8.6
aiosignal==1.3.1
aniso8601==9.0.1
async-timeout==4.0.3
attrs==23.1.0
blinker==1.7.0
certifi==2023.7.22
charset-normalizer==3.3.2
click==8.1.7
elastic-transport==8.10.0
elasticsearch==8.11.0
filelock==3.13.1
Flask==2.3.3
Flask-GraphQL==2.0.0
Flask-GraphQL-Auth==1.3.2
Flask-JWT-Extended==4.5.3
frozenlist==1.4.0
fsspec==2023.10.0
graphene==3.3
graphene-federation==3.1.4
graphql-core==3.2.3
graphql-relay==3.2.0
graphql-server==3.0.0b7
graphql-server-core==1.1.1
huggingface-hub==0.17.3
idna==3.4
importlib-metadata==6.8.0
itsdangerous==2.1.2
Jinja2==3.1.2
joblib==1.3.2
MarkupSafe==2.1.3
mpmath==1.3.0
multidict==6.0.4
networkx==3.2.1
nltk==3.8.1
numpy==1.26.2
packaging==23.2
Pillow==10.1.0
promise==2.3
PyJWT==2.0.0
python-dotenv==1.0.0
PyYAML==6.0.1
regex==2023.10.3
requests==2.31.0
safetensors==0.4.0
scikit-learn==1.3.2
scipy==1.11.3
sentence-transformers==2.2.2
sentencepiece==0.1.99
six==1.16.0
sympy==1.12
threadpoolctl==3.2.0
tokenizers==0.14.1
torch==2.1.0
torchvision==0.16.0
tqdm==4.66.1
transformers==4.35.0
typing_extensions==4.8.0
urllib3==2.1.0
Werkzeug==3.0.1
yarl==1.9.2
zipp==3.17.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants