-
-
Notifications
You must be signed in to change notification settings - Fork 149
Description
Is this related to an existing part of the documentation?
- Yes, it is related to an existing section
What needs to be updated?
📌 Current Documentation Issue
The current documentation fails to specify the correct module path for starting the FastAPI backend when the entry point is located within a subdirectory (e.g., app/main.py).
New contributors often attempt to run:
uvicorn main:app --reload
This results in the following startup error:
ERROR: Error loading ASGI app. Could not import module "main".
✨ Proposed Changes
I am proposing an update to the setup instructions to reflect the actual project structure. Specifically:
- Update the Startup Command: Change the recommended execution command to:
uvicorn app.main:app --reload
- Path Clarification: Add a brief note explaining that Uvicorn requires the full Python dot-notation path (
folder.filename:variable) to locate the ASGI application instance. - Troubleshooting Note: Include a quick tip on identifying the "module not found" error as a pathing issue.
📋 Additional Context
This change is necessary because the main.py file resides inside the app/ directory. Without specifying app.main, Python's module resolution fails. Standardizing this in the documentation will prevent onboarding friction and ensure a "one-click" style startup experience for the team.
Relevant Documentation Link (if any)
https://github.com/AOSSIE-Org/InPactAI/blob/main/README.md
Record
- I agree to follow this project's Code of Conduct
- I want to work on this update