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

Failed to run locally on Windows #68

Closed
v-jiaodi opened this issue Oct 16, 2023 · 7 comments · Fixed by #78
Closed

Failed to run locally on Windows #68

v-jiaodi opened this issue Oct 16, 2023 · 7 comments · Fixed by #78

Comments

@v-jiaodi
Copy link
Member

Describe the issue:
When test Running locally on Windows, run python -m gunicorn project.wsgi:application --pythonpath src --reload, get error as follow:
image

Repro Steps:

  1. Clone the repo to local.
  2. Create a Python virtual environment and activate it.
  3. Install requirements: python -m pip install -r src/requirements.txt
  4. Apply database migrations and seed initial data:
    python src/manage.py migrate
    python src/manage.py loaddata src/seed_data.json
  5. Running Locally:
    python src/manage.py collectstatic
    python -m gunicorn project.wsgi:application --pythonpath src --reload

Environment:

Expected behavior:
Please confirm if it can be supported on Windows. If so, it is expected that Run locally will pass.

@pamelafox for notification.

@pamelafox
Copy link
Collaborator

Interesting, I didn't realize gunicorn didn't work on Windows. It should work inside a Dev Container in VS Code in Windows. We can probably figure out commands for each framework that will work locally on Windows - flask has its own dev server, django has its own dev server, and fastapi can be run with uvicorn.
Thanks for the report! @kjaymiller

@kjaymiller
Copy link
Contributor

@v-jiaodi can you try to run locally again?

@kjaymiller kjaymiller linked a pull request Nov 2, 2023 that will close this issue
@v-jiaodi
Copy link
Member Author

v-jiaodi commented Nov 3, 2023

@kjaymiller The issue still exists.

@pamelafox
Copy link
Collaborator

@v-jiaodi Can you confirm that you tried the new instructions in the updated README?

https://github.com/Azure-Samples/azure-django-postgres-flexible-aca#running-locally

It now says:

python3 src/manage.py runserver 8000

That does not use gunicorn, so I hope is that it works for you.

@v-jiaodi
Copy link
Member Author

v-jiaodi commented Nov 6, 2023

@pamelafox
Copy link
Collaborator

@v-jiaodi We have merged the README updates to those repos. Can you take a look and confirm that works for you?

@v-jiaodi
Copy link
Member Author

v-jiaodi commented Nov 16, 2023

It works.

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

Successfully merging a pull request may close this issue.

3 participants