I have just started using cement as a python framework. It seems that the default config of the app is not JSON.
It seems that Cement has JsonConfigHandler()
class that could load JSON configuration into app. I have used the code below in my app:
ins = JsonConfigHandler()
ins.parse_file('/etc/luna/luna.conf')
But it gives the error below:
return self._parse_file(file_path)
File "/Library/Python/2.7/site-packages/cement/ext/ext_json.py", line 243, in _parse_file
self.merge(self._json.load(open(file_path)))
AttributeError: 'NoneType' object has no attribute 'load'
Hows should I load JSON config file in cement app?
By default I load config using app.config.parse_file('/etc/my_app/app.conf')
with no problem and config file contains:
[connection]
host=172.16.131.12