pulquero / BatteryAggregator

MIT License
36 stars 7 forks source link

Crash - UnboundLocalError: local variable 'is_charging' referenced before assignment #68

Closed endurance1968 closed 2 months ago

endurance1968 commented 2 months ago

Please include system details: Aggregator was running several days wo issues then it started to permanentely restart - this was going on for ~15min then stabilized again.

Hardware: Cerbo 3.41

2024-09-07 16:03:32.361550500 INFO:main:Registered Battery Aggregator com.victronenergy.battery.aggregator 2024-09-07 16:03:39.931723500 CRITICAL:ve_utils:exit_on_error: there was an exception. Printing stacktrace will be tried and then exit 2024-09-07 16:03:39.931734500 Traceback (most recent call last): 2024-09-07 16:03:39.931736500 File "/data/BatteryAggregator/ext/ve_utils.py", line 22, in exit_on_error 2024-09-07 16:03:39.931739500 return func(*args, kwargs) 2024-09-07 16:03:39.931742500 File "/data/BatteryAggregator/ext/dbusmonitor.py", line 345, in _execute_value_changes 2024-09-07 16:03:39.931745500 self.valueChangedCallback(serviceName, objectPath, 2024-09-07 16:03:39.931905500 File "/data/BatteryAggregator/battery_service.py", line 533, in _service_value_changed 2024-09-07 16:03:39.931911500 self._battery_value_changed(dbusServiceName, dbusPath, options, changes, deviceInstance) 2024-09-07 16:03:39.931915500 File "/data/BatteryAggregator/battery_service.py", line 562, in _battery_value_changed 2024-09-07 16:03:39.931919500 self._adjust_ir(dbusServiceName, current) 2024-09-07 16:03:39.931921500 File "/data/BatteryAggregator/battery_service.py", line 786, in _adjust_ir 2024-09-07 16:03:39.931953500 if is_charging: _2024-09-07 16:03:39.931955500 UnboundLocalError: local variable 'ischarging' referenced before assignment**