Open ghost opened 4 years ago
Thanks for filing this issue!
Could you provide a minimal set of steps and code, so that I can reproduce this issue?
this is reproducible with any django>=3.0
like in this tutorial
django-admin startproject mysite
and after adding livereload
to the apps,
if one tries to run
python manage.py livereload
then the above traceback would appear
I had a similar problem and managed to work around as per suggestion here:
https://docs.djangoproject.com/en/3.1/topics/async/#async-safety
ie defined an environment variable:
DJANGO_ALLOW_ASYNC_UNSAFE=1
note this should only be done in a local non-production/development environment or you could risk losing/corrupting data.
In my case I am running a project created using django 3.1.7 and python 3.8.8
I had a similar problem and managed to work around as per suggestion here: https://docs.djangoproject.com/en/3.1/topics/async/#async-safety ie defined an environment variable:
DJANGO_ALLOW_ASYNC_UNSAFE=1
note this should only be done in a local non-production/development environment or you could risk losing/corrupting data.
In my case I am running a project created using django 3.1.7 and python 3.8.8
Does not work for me
Any idea on how to solve that for production? Thanks!
You really shouldn't be using livereload in production.
I believe your issue is with the allauth library. I'm currently facing the same problem. It appears that this library doesn't support asynchronous usage by default. I'm still unsure about what to do next — whether to manually implement the entire authentication part or to integrate this library into my project and modify its code to fit the asynchronous context.
@PauloDoMonte I'm currently working on livereload v3, which is ASGI based.
I have Ubuntu 18.04. I've followed the instructions in the README, but when I run
python manage.py livereload
and openlocalhost:8000
I get a SynchronousOnlyOperation error. My traceback is as follows. It seems to raise error at {% user.is_authenticated %} template tag.My project structure is as follows: