eamigo86 / graphene-django-extras

Extras functionalities for Graphene-Django
MIT License
417 stars 107 forks source link

python error: can only concatenate list (not "tuple") to list in __init__.py #192

Closed dannielXdx closed 1 year ago

dannielXdx commented 1 year ago

I have the following error while importing graphene_django_extras:

from graphene_django_extras import DjangoObjectField
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/home/dannielxdx/.virtualenvs/cactus/lib/python3.9/site-packages/graphene_django_extras/__init__.py", line 4, in <module>
    from .directives import all_directives
  File "/home/dannielxdx/.virtualenvs/cactus/lib/python3.9/site-packages/graphene_django_extras/directives/__init__.py", line 53
    all_directives = [d() for d in all_directives] + default_directives
    TypeError: can only concatenate list (not "tuple") to list

I fixed it by doing the following: "": "tuple([d() for d in all_directives]) + default_directives" But I don't understand why this problem only happens to me. I have python 3.9.16 with Django 3.2 Do you know any way to fix it without modifying the package?