Ask coding questions

← Back to all posts
How do I add info from the secrets folder to my code?
belk42 (0)

I made the key --> TOKEN but when I try to add it in using the code'TOKEN')
I just get an error. This is the error:
" File "", line 19
SyntaxError: unexpected EOF while parsing"
There is nothing at line 19

Saml2020 (58)

In Python for every ( you will need a )

So to fix your issue change it to'TOKEN'))
belk42 (0)

@Saml2020 unfortunately i still cant get it to work

Saml2020 (58)

@belk42 my_secret = os.environ['TOKEN'] This shows that my_secret already contains the token.

So the last line should be