GitHub Workflows: Python: TypeError: '_Environ' object is not callable

So I’m using github workflows to make a python app and I’m using the os module to get repo secrets

print(os.environ('thing'))

But I’m getting an error

TypeError: ' _Environ' object is not callable

h e l p m e

“github workflows” is not pertinent here. You are using os.environ incorrectly.

os.environ is a dictionary, not a function.

You might look at this. Namely, you want to do:

env_var = os.environ
print(env_var['thing'])

or

print(os.environ['thing'])