question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Doesn't support latest graphene-django v3.0.0b1

See original GitHub issue

Latest beta version of graphene and graphene-django gives this error:-

Exception in thread django-main-thread:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/BfutureP/Desktop/BfutureP/Baniya-BE/.venv/lib/python3.8/site-packages/django/utils/autoreload.py", line 53, in wrapper
    fn(*args, **kwargs)
  File "/Users/BfutureP/Desktop/BfutureP/Baniya-BE/.venv/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 117, in inner_run
    self.check(display_num_errors=True)
  File "/Users/BfutureP/Desktop/BfutureP/Baniya-BE/.venv/lib/python3.8/site-packages/django/core/management/base.py", line 392, in check
    all_issues = self._run_checks(
  File "/Users/BfutureP/Desktop/BfutureP/Baniya-BE/.venv/lib/python3.8/site-packages/django/core/management/base.py", line 382, in _run_checks
    return checks.run_checks(**kwargs)
  File "/Users/BfutureP/Desktop/BfutureP/Baniya-BE/.venv/lib/python3.8/site-packages/django/core/checks/registry.py", line 72, in run_checks
    new_errors = check(app_configs=app_configs)
  File "/Users/BfutureP/Desktop/BfutureP/Baniya-BE/.venv/lib/python3.8/site-packages/django/core/checks/urls.py", line 40, in check_url_namespaces_unique
    all_namespaces = _load_all_namespaces(resolver)
  File "/Users/BfutureP/Desktop/BfutureP/Baniya-BE/.venv/lib/python3.8/site-packages/django/core/checks/urls.py", line 57, in _load_all_namespaces
    url_patterns = getattr(resolver, 'url_patterns', [])
  File "/Users/BfutureP/Desktop/BfutureP/Baniya-BE/.venv/lib/python3.8/site-packages/django/utils/functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/Users/BfutureP/Desktop/BfutureP/Baniya-BE/.venv/lib/python3.8/site-packages/django/urls/resolvers.py", line 588, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/Users/BfutureP/Desktop/BfutureP/Baniya-BE/.venv/lib/python3.8/site-packages/django/utils/functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/Users/BfutureP/Desktop/BfutureP/Baniya-BE/.venv/lib/python3.8/site-packages/django/urls/resolvers.py", line 581, in urlconf_module
    return import_module(self.urlconf_name)
  File "/Library/Frameworks/Python.framework/Versions/3.8/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 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/BfutureP/Desktop/BfutureP/Baniya-BE/baniya_be/baniya_be/urls.py", line 22, in <module>
    from graphql_jwt.decorators import jwt_cookie
  File "/Users/BfutureP/Desktop/BfutureP/Baniya-BE/.venv/lib/python3.8/site-packages/graphql_jwt/__init__.py", line 1, in <module>
    from . import relay
  File "/Users/BfutureP/Desktop/BfutureP/Baniya-BE/.venv/lib/python3.8/site-packages/graphql_jwt/relay.py", line 5, in <module>
    from . import mixins
  File "/Users/BfutureP/Desktop/BfutureP/Baniya-BE/.venv/lib/python3.8/site-packages/graphql_jwt/mixins.py", line 8, in <module>
    from .decorators import csrf_rotation, ensure_token, setup_jwt_cookie
  File "/Users/BfutureP/Desktop/BfutureP/Baniya-BE/.venv/lib/python3.8/site-packages/graphql_jwt/decorators.py", line 10, in <module>
    from graphql.execution.base import ResolveInfo
ModuleNotFoundError: No module named 'graphql.execution.base'

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

3reactions
wodCZcommented, May 20, 2020

The issue is with graphql-core compatibility, which already has stable release (3.1.1).

Even if that wasn’t the case, beta release is about the right time for other packages to adapt, as it’s still time to raise an issue in case the package depends on API that is no longer available.

Also, missing support might be a blocker for a real-world project to adapt and test beta releases.

It seems the new ResolveInfo is moved and renamed:

from graphql.type import GraphQLResolveInfo as ResolveInfo

(not tested)

2reactions
ulgenscommented, May 20, 2020

@wodCZ

beta release is about the right time for other packages to adapt

It’s not the case this time. Maybe the version should be renamed as alpha, i think it would be better, but again it’s really far from being mature at this moment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

In graphene-django, how do i return an errors list?
Can i raise an exception in a graphene.Mutation 's mutate method so it gives an "errors" list in the GraphQL response?
Read more >
graphene-django 3.0.0b1 on Python PyPI - NewReleases.io
New release graphene-django version 3.0.0b1 v3.0.0b1 on Python PyPI. ... This release uses Graphene v3 which drops support for Python 2 and uses...
Read more >
graphene Changelog - pyup.io
Non-required `InputFields` and `Arguments` can now be marked as deprecated by passing the `deprecation_reason` keyword argument to the constructor. * Complete ...
Read more >
install - graphene - django
Graphene-Django currently supports the following versions of Django: ... (Change graphiql=True to graphiql=False if you do not want to use the GraphiQL API ......
Read more >
Graphene 是Python 的GraphQL 框架,用于快速轻松 ... - Gitee
Graphene supports several versions of Python. To make sure that changes do not break compatibility with any of those versions, we use tox...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found