Version 0.9.0 raises ImportError
See original GitHub issueWhen using these packages:
Package Version
------------------------------ ----------
graphene 2.1.9
graphene-django 2.15.0
graphene-django-optimizer 0.9.0
graphql-core 2.3.2
graphql-relay 2.0.1
the following exception gets raised when running tests or accessing the GraphiQL interface:
Internal Server Error: /graphql/
Traceback (most recent call last):
File "/home/andi/virtualenvs/smelt/lib/python3.8/site-packages/graphene_django/settings.py", line 80, in import_from_string
module = importlib.import_module(module_path)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 848, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/andi/workspace/smelt/smelt/smelt/schema.py", line 7, in <module>
from smeltapp import schema
File "/home/andi/workspace/smelt/smelt/smeltapp/schema.py", line 16, in <module>
from graphene_django_optimizer import query, OptimizedDjangoObjectType, resolver_hints
File "/home/andi/virtualenvs/smelt/lib/python3.8/site-packages/graphene_django_optimizer/__init__.py", line 2, in <module>
from .query import query # noqa: F401
File "/home/andi/virtualenvs/smelt/lib/python3.8/site-packages/graphene_django_optimizer/query.py", line 11, in <module>
from graphql import GraphQLResolveInfo, GraphQLSchema
ImportError: cannot import name 'GraphQLResolveInfo' from 'graphql' (/home/andi/virtualenvs/smelt/lib/python3.8/site-packages/graphql/__init__.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/andi/virtualenvs/smelt/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/home/andi/virtualenvs/smelt/lib/python3.8/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/home/andi/virtualenvs/smelt/lib/python3.8/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/andi/virtualenvs/smelt/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/home/andi/virtualenvs/smelt/lib/python3.8/site-packages/django/views/generic/base.py", line 62, in view
self = cls(**initkwargs)
File "/home/andi/virtualenvs/smelt/lib/python3.8/site-packages/graphene_django/views.py", line 104, in __init__
schema = graphene_settings.SCHEMA
File "/home/andi/virtualenvs/smelt/lib/python3.8/site-packages/graphene_django/settings.py", line 127, in __getattr__
val = perform_import(val, attr)
File "/home/andi/virtualenvs/smelt/lib/python3.8/site-packages/graphene_django/settings.py", line 66, in perform_import
return import_from_string(val, setting_name)
File "/home/andi/virtualenvs/smelt/lib/python3.8/site-packages/graphene_django/settings.py", line 89, in import_from_string
raise ImportError(msg)
ImportError: Could not import 'smelt.schema.schema' for Graphene setting 'SCHEMA'. ImportError: cannot import name 'GraphQLResolveInfo' from 'graphql' (/home/andi/virtualenvs/smelt/lib/python3.8/site-packages/graphql/__init__.py).
With version 0.8.0 this exception does not get raised.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:12
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Python: Pandas pd.read_excel giving ImportError: Install xlrd ...
Background: I'm trying to extract an excel file with multiple worksheets as a dict of data frames.I installed xlrd version 0.9.0 and the...
Read more >nengo_loihi.hardware.interface — Nengo Loihi 0.10.0 docs
import collections from distutils.version import LooseVersion import logging import os ... "0.0.0")) if version < cls.min_nxsdk_version: raise ImportError( ...
Read more >Source code for geoalchemy2.elements
... from sqlalchemy.sql.functions import FunctionElement except ImportError: ... Raise an AttributeError when the attribute name doesn't start # with st_.
Read more >Release 0.6.1 - Statsmodels
PR #1160: DOC: update scipy version from 0.7 to 0.9.0. PR #1147: ENH: add lbfgs for fitting. PR #1156: ENH: Raise on 0,0...
Read more >What's new - Nilearn
Support for Python 3.7 is deprecated and will be removed in release 0.12 (#3429 by ... Nilearn no longer raises ImportError for nose...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Added note to readme. If someone knows a way to warn about version incompatibility with
pip
, please let me know. Will leave this issue open so that people can find it easier.On the same boat using
graphene-django==2.15.0
but with nographene
and currently usinggraphene-django-optimizer==0.6.2
. Should the move be to scrapgraphene-django
(updates are too slow) and just usegraphene v3
withgraphene-django-optimizer==0.9.0
?