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

event loop in thread not starting #25

Open
abdi-El opened this issue Feb 21, 2023 · 8 comments
Open

event loop in thread not starting #25

abdi-El opened this issue Feb 21, 2023 · 8 comments

Comments

@abdi-El
Copy link

abdi-El commented Feb 21, 2023

a got this error while configuring my urls: {"errors":[{"message":"There is no current event loop in thread 'Thread-1 (process_request_thread)'.","locations":[{"line":2,"column":7}],"path":["model"]}],"data":{"model":null}}

@artel1992
Copy link

I have same problem

@PaulGilmartin
Copy link
Owner

@abdi-El @artel1992 Thanks for raising.

I need some more information on your set-up before I can diagnose the issue.

  • What version of Django are you using? Note that Django 4 is not yet supported, as described here: Django 4 compatibility  #24
  • Have you used graph_wrap before successfully? If so, when did this bug start?

Any information you can share about your project set-up so I can attempt to reproduce the issue would also help.

@artel1992
Copy link

Perhaps this will help you
graphql-python/graphene-django#1387 (comment)

@PaulGilmartin
Copy link
Owner

@artel1992 possibly that's related, I'm not sure. What version of graphene-django are you using?

@abdi-El
Copy link
Author

abdi-El commented Feb 21, 2023

@abdi-El @artel1992 Thanks for raising.

I need some more information on your set-up before I can diagnose the issue.

  • What version of Django are you using? Note that Django 4 is not yet supported, as described here: Django 4 compatibility  #24
  • Have you used graph_wrap before successfully? If so, when did this bug start?

Any information you can share about your project set-up so I can attempt to reproduce the issue would also help.

this is the first time that i'm using graph_wrap. I didn' know that using django >= 4.0 was an issue, i'll try to downgrade and see what happens

@PaulGilmartin
Copy link
Owner

@abdi-El Looking into it, it looks like the issue (graphql-python/graphene-django#1284) on graphene-django which was blocking graph wrap supporting Django >= 4 is now resolved, so I should work on adding support for that soon. Until then it would be good if you could try downgrading Django to let me know if the issue persists. Please also try downgrading graphene-django to version 2.15.0.

@abdi-El
Copy link
Author

abdi-El commented Feb 21, 2023

@PaulGilmartin @artel1992 I tried to downgrade an that wasn't the only issue, I resolved by doing this:

  1. added this quick fix
  2. downgraded graphene-django to 2.15.0
  3. downgrading < 4.0

@PaulGilmartin
Copy link
Owner

@abdi-El I would have thought that graphql-python/graphene-django#1387 (comment) only pertains to graphene-django > 3.0 and that downgrading to 2.15.0 would be enough without the quick fix.

I'm glad you managed to resolve it anyway. I will add support for Django > 4 and graphene-django 3.0 as soon as possible. I will probably wait until I also see a proper solution for the linked issue graphql-python/graphene-django#1387 (comment).

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

No branches or pull requests

3 participants