79779535

Date: 2025-09-30 21:47:49
Score: 2.5
Natty:
Report link

This error happens because of how Python resolves imports. If your project looks like:

repo/
├── src/
│   ├── __init__.py
│   └── test.py

then:

uvicorn src.test:app only works when you run it from the directory that contains src.

Do you want to share what your folder structure looks like to better look into this?

Reasons:
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Asiru Erioluwa