How so i reference a service json file


I’m facing an issue referencing a service json file my python script requires.

Ive tried ‘service.json’, ‘./service.json’, ‘.service.json’

the file is in the same repo as my code

I have no idea what I am doing but this should (hopefully, theoretically) work. If you are making a website with Flask or Django or something like that, you should have something like “current_app.root”(works in flask). If not,

import os

this should give you the current working directory and you can append your file.

path = os.getcwd() + “/service.json”

[Maybe try with /, \, no slash; as I said, I have no idea what I am doing]

An alternative method could be to go to your deployment’s console and type pwd. And you’ll get the working directory. And you can manually type in your file address. In Koyeb, I believe it is something like: