You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used the GitHub search to find a similar question and didn't find it.
I searched in the documentation/README.
I already searched in Google "How to do X" and didn't find any information.
I already read and followed all the tutorial in the docs/README and didn't find an answer.
Commit to Help
I commit to help with one of those options 👆
Example Code
uvicorn backend.app.main:app --reload
Description
I forked the template and have run the above uvicorn command. I initially received some errors where it could not find a bunch of relative imports, and I had to prepend "backend." to a bunch of imports, since it was pointing towards the project root and not the "backend/" directory. I am now receiving 5 validation errors for "Settings".
File "/Users/alexmcgraw/Library/Mobile Documents/com~apple~CloudDocs/Documents/Side_Projects/news_comparison/backend/app/main.py", line 7, in <module>
from backend.app.api.main import api_router
File "/Users/alexmcgraw/Library/Mobile Documents/com~apple~CloudDocs/Documents/Side_Projects/news_comparison/backend/app/api/main.py", line 3, in <module>
from backend.app.api.routes import items, login, private, users, utils
File "/Users/alexmcgraw/Library/Mobile Documents/com~apple~CloudDocs/Documents/Side_Projects/news_comparison/backend/app/api/routes/items.py", line 7, in <module>
from backend.app.api.deps import CurrentUser, SessionDep
File "/Users/alexmcgraw/Library/Mobile Documents/com~apple~CloudDocs/Documents/Side_Projects/news_comparison/backend/app/api/deps.py", line 11, in <module>
from backend.app.core import security
File "/Users/alexmcgraw/Library/Mobile Documents/com~apple~CloudDocs/Documents/Side_Projects/news_comparison/backend/app/core/security.py", line 7, in <module>
from backend.app.core.config import settings
File "/Users/alexmcgraw/Library/Mobile Documents/com~apple~CloudDocs/Documents/Side_Projects/news_comparison/backend/app/core/config.py", line 120, in <module>
settings = Settings() # type: ignore
^^^^^^^^^^
File "/Users/alexmcgraw/Library/Mobile Documents/com~apple~CloudDocs/Documents/Side_Projects/news_comparison/.venv/lib/python3.12/site-packages/pydantic_settings/main.py", line 176, in __init__
super().__init__(
File "/Users/alexmcgraw/Library/Mobile Documents/com~apple~CloudDocs/Documents/Side_Projects/news_comparison/.venv/lib/python3.12/site-packages/pydantic/main.py", line 214, in __init__
validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 5 validation errors for Settings
PROJECT_NAME
Field required [type=missing, input_value={}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.10/v/missing
POSTGRES_SERVER
Field required [type=missing, input_value={}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.10/v/missing
POSTGRES_USER
Field required [type=missing, input_value={}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.10/v/missing
FIRST_SUPERUSER
Field required [type=missing, input_value={}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.10/v/missing
FIRST_SUPERUSER_PASSWORD
Field required [type=missing, input_value={}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.10/v/missing
I changed all of the variables in the .env that specified "changethis" but am receiving this error now and cannot figure out what is wrong. What do I need to change so I can run the base template?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
I forked the template and have run the above uvicorn command. I initially received some errors where it could not find a bunch of relative imports, and I had to prepend "backend." to a bunch of imports, since it was pointing towards the project root and not the "backend/" directory. I am now receiving 5 validation errors for "Settings".
I changed all of the variables in the .env that specified "changethis" but am receiving this error now and cannot figure out what is wrong. What do I need to change so I can run the base template?
Operating System
macOS
Operating System Details
N/A
Python Version
3.12.1
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions