svalouch / rctmon

Pulls data from RCT Power GmbH devices for use with monitoring systems.
https://rctmon.readthedocs.io
GNU General Public License v3.0
17 stars 8 forks source link

app does not start #1

Closed MichaelMMS closed 2 years ago

MichaelMMS commented 2 years ago

Get this error:

AttributeError: 'InfluxDB' object has no attribute '_client'

I do not want to use InfluxDB so, InfluxDB is set to false in config.

Debug: 2021-07-07 20:05:57,719 - rctmon.daemon - INFO - Systemd module detected 2021-07-07 20:05:57,719 - rctmon.daemon - INFO - Daemon initializing 2021-07-07 20:05:57,720 - rctmon.device_manager - INFO - DeviceManager initializing 2021-07-07 20:05:57,720 - rctmon.battery_manager - INFO - BatteryManager initializing 2021-07-07 20:05:57,720 - rctmon.daemon - INFO - Prometheus endpoint is at http://127.0.0.1:9831/metrics 2021-07-07 20:05:57,721 - rctmon.daemon - INFO - Signaling readiness 2021-07-07 20:05:57,721 - rctmon.daemon - INFO - Ready to start the main loop 2021-07-07 20:05:57,721 - rctmon.daemon - INFO - Starting main loop 2021-07-07 20:05:57,721 - rctmon.daemon - INFO - Time to attempt reconnection Traceback (most recent call last): File "/usr/local/bin/rctmon", line 10, in sys.exit(cli()) File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1137, in call return self.main(args, kwargs) File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1062, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1668, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 763, in invoke return __callback(args, *kwargs) File "/usr/local/lib/python3.7/dist-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), args, **kwargs) File "/usr/local/lib/python3.7/dist-packages/rctmon/cli.py", line 53, in daemon Daemon(settings).run() File "/usr/local/lib/python3.7/dist-packages/rctmon/daemon.py", line 294, in run self._handle_received_data() File "/usr/local/lib/python3.7/dist-packages/rctmon/daemon.py", line 338, in _handle_received_data self._device_manager.on_frame(self._current_frame) File "/usr/local/lib/python3.7/dist-packages/rctmon/device_manager.py", line 241, in on_frame self._influx_raw(frame.id, value) File "/usr/local/lib/python3.7/dist-packages/rctmon/device_manager.py", line 165, in _influx_raw .field(type_field, value) File "/usr/local/lib/python3.7/dist-packages/rctmon/influx.py", line 59, in add_points if self._client: AttributeError: 'InfluxDB' object has no attribute '_client'

svalouch commented 2 years ago

I forgot to initialize the variable, sorry for that. Should be fixed now!

MichaelMMS commented 2 years ago

Thanks, that was very fast! Great Software