'Stuck in Watching for file changes with StatReloader
I made my project fine and when I run my server through a normal shell it works but I am trying to run my project through git bash. All the commands seem to work fine but when I do
python manage.py runserverit gets stuck on Watching for file changes with StatReloader. Apparently after that I go tolocalhost:8000
but that and my 127 port 8000 are not responding and show that theres nothing there, No errors or anything and like I said if I python manage.py runserver through shell it works
Solution 1:[1]
If you use django with Dockerfile, you won't miss that env var PYTHONUNBUFFERED set by 1.
Solution 2:[2]
Using Git Bash run:
$ python manage.py runserver 127.0.0.1:8000
In my case, it showed the same behavior ('Stuck in watching...'). However, after that I opened a browser and I typed:
127.0.01:8000. The Django webpage works properly.
Solution 3:[3]
Probably autoreload does not work well in your environment, if you don't need it - better turn it off by starting django with --noreload arg.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | William Bernal |
| Solution 3 | TPRLab |
