-
Notifications
You must be signed in to change notification settings - Fork 766
There is no current event loop in thread 'Thread-2 (process_request_thread)'. #1387
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
Comments
I'm seeing a similar issue when attempting to update. Any thoughts? |
Same here. What I know so far is that the endpoing does work in principal, but fails only for certain objects. In my case, my endpoint should return several fields, one of them being |
Interesting... is it possible that maybe Graphene's expecting a value where there's none? EG something is |
So it definitely is error handling being squelched. I also made a slight discovery. For Graphene-Django v2, I had a resolve function declared such as:
The value So not sure how to fix it such that the errors aren't being squelched, but that might at least give you a point to start looking. |
I had similar issue - it is caused by the debugging middleware that is using promises. If you have an error in your code (an error is thrown), then the debugging middleware kicks in but unfortunately eats up the original exception and fails on its own exception - because it is trying to access eventloop outside of the main thread. Quick fix is to disable debugging middleware in your settings # settings.py
GRAPHENE = {
"MIDDLEWARE": (), # empty = force disable debugging middleware
# ...
} |
Not sure if this is helpful for fixing the issue, but my quick fix when I've run into a "There is no current event loop in thread" type of error is to place a breakpoint in line 557 of Usually, |
Uh oh!
There was an error while loading. Please reload this page.
A simple query fails with a cryptic, seemingly asyncIO-related error:
Link to reproduction repository: https://github.com/ewen-lbh/bug-report-django-graphene
Steps to reproduce:
git clone https://github.com/ewen-lbh/bug-report-django-graphene
cd bug-report-django-graphene
poetry install
(orpip install -r requirements.txt
)cd repro
poetry run python manage.py migrate && poetry run python manage.py runserver
Navigate to
127.0.0.1:8000/graphql
Try executing the following query:
The query executes and returns its result
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow)
The text was updated successfully, but these errors were encountered: