I had deployed my application in the Azure Linux environment.
I followed the official python example:
To confirm that this has created the 2 environment variables we expect, again, in the Portal for your App Service, go to an SSH session (this is in place of the old Console option).
In the shell, type printenv
to see all the environment variables set. Look for the 2 that your app is currently failing to find:
If they're missing let me know and at least we'll be better placed to dig further.