Open arossmann opened 5 years ago
ERROR 40 <-- my fault. it couldn't find the config file
Happy for you you fixed the issue. I think it's worth catching the error. Would you like to propose a PR?
Also see: https://stackoverflow.com/a/18091313/6654920
And my suggestion on how to react:
Happy for you you fixed the issue. I think it's worth catching the error. Would you like to propose a PR?
Also see: https://stackoverflow.com/a/18091313/6654920
And my suggestion on how to react:
As I ran in the same situation (but was aware of the missing config g), a suitable error message would be better. I'll create one
when I run the python script, I get this error: Traceback (most recent call last): File "/opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py", line 126, in
reporting_mode = config['General'].get('reporting_method', 'mqtt-json')
File "/usr/lib/python3.5/configparser.py", line 956, in getitem
raise KeyError(key)
KeyError: 'General'
What am I doing wrong?
my config is this: