Drolla / WavePlus_Bridge

Airthings Wave Plus Bridge to Wifi/LAN and MQTT
MIT License
21 stars 9 forks source link

Application crashes if 'period' or'data_retention' are not explicitly defined by the YAML file #8

Closed Drolla closed 2 years ago

Drolla commented 2 years ago

This issue relates to pull request https://github.com/Drolla/WavePlus_Bridge/pull/7. In case period or data_retention is not explicitly defined by the YAML configuration file, the application returns with the following failure

Read configuration file /opt/waveplus_bridge/waveplus_bridge.fusion18.basic.yaml
2021-11-14 08:45:50 - Opening CSV data log file None
2021-11-14 08:45:50 -   Error accessing CSV file! None : unsupported operand type(s) for /: 'str' and 'int'

This error is also encountered if the two parameters are not defined by the YAML file, but if they are explicitly defined by the command line arguments --period and _--dataretention.

Drolla commented 2 years ago

Fixed with commit https://github.com/Drolla/WavePlus_Bridge/commit/516253651ebc653904c8b60217697a1db14c91fb