How to Solve Error: [Errno 11001] getaddrinfo failed

When starting Django project, we encountered: error: [errno 11001] getaddrinfo failed error

You can run the following command in Ubuntu, but if you transfer the project to windows 10, there will be an error:

# --insecure argument to force django to process static files, when closing debug is added (--insecute)
python manage.py  runserver 0:8000 --insecure
# or
python manage.py  runserver 0:8000

Debug code in settings.py file

DEBUG = False
ALLOWED_HOSTS = ["*"]

Run the following command in Windows 10 to solve the problem

python manage.py runserver 0.0.0.0:8000 --insecute
# or
python manage.py runserver 0.0.0.0:8000

Similar Posts: