#neil3rd
1 messages · Page 1 of 1 (latest)
What help do you need specifically? What have you tried that hasn't worked?
I am seeking help of Stripe team over at glitch.com/@jaunty smelt since they must have encountered this before
How do I fix this errors
Are you a developer?
relatively new to dev work
Okay, so what have you tried so far to fix the errors?
I have tried different installations of Python versions.
In 2 months, this is my 5th attempt trying to have this addressed directly by the Stripe team of glitch.com/@jaunty smelt
I have tried also communicating with senior devs in the glitch community forum itself. No response.
I have also tried my luck with a dev with a PhD. No response.
Which specific code are you trying to run?
There's a lot of different code at https://glitch.com/@Stripe
This Python Flask version https://glitch.com/~flask-python3
with this Flask code https://github.com/stripe-samples/connect-onboarding-for-express
Can you share the code that's throwing the errors above?
Okay, so the error is coming from line 21. That line is doing a lot of things at once. If you add code above line 21 to log the result of each part of line 21 that might narrow things down. For example, if you log the value of os.getenv("STATIC_DIR") is the value what you expect?
How do I "log the value"?
You can use print()
So print(os.getenv("STATIC_DIR")) above line 21; what does the output look like?
The first one.
first one has this "None"
Okay, so that's likely the issue. It sounds like that environment variable isn't set.
That's probably leading to the type error at the bottom about NoneType.
How do I set the environment variable?
What specifically is the environment variable; is it a number; is it a Flask command?
You can read about environment variables and how to use them in Python here: https://pythontect.com/python-os-getenv-method-tutorial/
copy on this, though
though will I able to set the said environment variable as just a plain user of glitch.com? Or does it require higher level privileges?
Yes, you should be able to set environment variables with glitch: https://support.glitch.com/t/how-do-i-set-environment-variables/3921
Yes, the .env file is where you would set environment variables