1
def env_variables():
    dir_path = os.path.dirname(os.path.realpath(__file__))
    os.environ["DIALOGFLOW_PROJECT_ID"] = "bot-fvji"
    os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = os.path.join(dir_path, "fvji0c3efb18f6e6.json")
    command = os.popen('echo $GOOGAUTH | base64 --decode > /app/fvji0c3efb18f6e6.json')
    return
    
env_variables()

The code should read a json file in the same folder

Raymond
  • 11
  • 1
  • 1
    Are you sure this is an issue with finding the file? What are you trying to do by setting those values on `os.environ`? They won't affect the command you run via `os.popen()`. – ChrisGPT was on strike Nov 30 '22 at 21:47
  • I think you would want to change the location name in the os.popen() to {dir_path}/app/fvji0c3efb18f6e6.json maybe – polarfuchs Nov 30 '22 at 21:58

0 Answers0