full-stack-fastapi-template icon indicating copy to clipboard operation
full-stack-fastapi-template copied to clipboard

Fix parsing json backend cors

Open robertop23 opened this issue 3 years ago • 0 comments

I usually use the Python shell when I'm developing, but I cannot simple open it using the env vars because I get this error:

pydantic.env_settings.SettingsError: error parsing JSON for "BACKEND_CORS_ORIGINS"

How to reproduce this error:

cd backend/app/
export $(grep -v '^#' ../../.env | tr -d ' ' | xargs) && poetry run python

And inside the Python terminal:

from app.core.config import settings

robertop23 avatar Apr 21 '21 12:04 robertop23