2 years ago
I set a variable with in the UI for dbsslmode to require but it does not seem to load. assert getenv("dbsslmode") == "require"
File "/app/fb_models.py", line 16, in
assert getenv("dbsslmode") == "require"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionErrorI added this assert because I was getting a None type error on the env variable.
I must be doing something stupid.
I am using load_dotenv() but I dont this this is causing the issue.
13 Replies
2 years ago
a production app running on railway would not need to call load_dotenv() because railway has service variables that get automatically injected into the environment, have you set your desired variable there?
I have setup the variable.
My understanding is that load_dotenv() won’t have cause any issue, I need this for local testing so would prefer to leave it.
2 years ago
please send a screenshot of your service variables tab
2 years ago
you have not deployed any of the changes
2 years ago
click the big blue deploy button
2 years ago
at the top it shows you that you have pending changes
2 years ago
no problem

