Skip to content Skip to sidebar Skip to footer

Where To Mention Path Of Files In Azure Flask Based Python App

I have a Flask based python web app which is running fine on azure. I have made some changes and added a input.json file which contains some project configuration. I have below fil

Solution 1:

pretty sure you need to use relative path, something like this:

os.path.join(os.path.dirname( __file__ ), 'input.json')

so you will get path in the same directory your python file is located. And this is not related to web.config. your python file attempts to load this file (this is my assumption). hence its looking for it in the path relative to the interpreter, not your python file.

Post a Comment for "Where To Mention Path Of Files In Azure Flask Based Python App"