Closed judywawira closed 4 years ago
Usually issues with config will boil down to it looking in the wrong file. It's looking for a file in theQGENDA_CONF_FILE
environment variable. From the README:
import os
# tell configparser where to look for config
os.environ['QGENDA_CONF_FILE'] = '/path/to/qgenda.conf'
# optional
os.environ['QGENDA_CONF_REGION'] = 'name_of_region' # defaults to qgenda
from qgenda.api import client
client = client.QGendaClient()
client.authenticate()
If you run the below and it cannot print out the contents of your config file, python probably cannot find your file path as indicated.
import os
os.environ['QGENDA_CONF_FILE'] = '/path/to/qgenda.conf'
with open(QGENDA_CONF_FILE, 'r') as config_file:
print(config_file.read())
Having a look at how the config is loaded might help as well: https://github.com/jjorissen52/python-qgenda/blob/master/qgenda/settings.py
@judywawira Closing this. If you are still having issues I will reopen.
Hello
I copied the config file but keep getting this error _ have you seen this before?
I have confirmed that all the fields are missing - and I can localize that the problem is at the level of JSON -but cannot figure out how to fix it
JSONDecodeError: Expecting value: line 1 column 1 (char 0)