I am trying to import a config json file from a different directory from where i want to use it. Am getting this error :
with open('../../config/config.json', 'r') as f:
IOError: [Errno 2] No such file or directory: '../../config/config.json'
This is what I did. I tried importing JSON library and load the file as shown in the code below.
import json
with open('../../config/config.json', 'r') as f:
config = json.load(f)
Any help will be appreciated