Environment variable returns None

Its my first time with both Python and Render.

I setup an environment variable in Render and trying to use it in my Python script with os.getenv(), but it returns None. The key spelling is identical. Works on my local machine with the variable set in windows.

What could be the problem here?

Hi there,

At a guess, environment variables are case-sensitive and would need to ensure it was exactly the same.

If those match exactly, please could you share some specific details of the issue you are experiencing that may help us troubleshoot it with you, e.g. any logs/errors/output, specific env names, example of how you’re calling the var, service name/ID, reproduction steps, etc. If you don’t want to share these details on the community forum, please feel free to raise a ticket from the “Contact Support” link at the bottom of the Dashboard.



This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.