I had a power failure in my house and now, when trying to start apiscraper.py, I get this error:
pi@raspberrypi:~ $ ./apiscraper.sh
2019-10-08 22:20:13 INFO HTTP Server Thread started on port 8023
2019-10-08 22:20:17 INFO Writing Points to Influx: charge_state
2019-10-08 22:20:17 INFO Writing Points to Influx: climate_state
2019-10-08 22:20:17 INFO Writing Points to Influx: drive_state
2019-10-08 22:20:17 INFO Writing Points to Influx: gui_settings
2019-10-08 22:20:17 INFO Writing Points to Influx: vehicle_state
2019-10-08 22:20:17 INFO Asleep since: 0 Sleeping for 1 seconds..
Traceback (most recent call last):
File "./apiscraper.py", line 426, in
car_active_state = state_monitor.ongoing_activity_status()
File "./apiscraper.py", line 120, in ongoing_activity_status
or self.old_values['charge_state'].get('charger_voltage', 0) > 0 or self.old_values['charge_state'].get('charger_actual_current', 0) > 0:
TypeError: '>' not supported between instances of 'NoneType' and 'int'
pi@raspberrypi:~ $
I had a power failure in my house and now, when trying to start apiscraper.py, I get this error:
pi@raspberrypi:~ $ ./apiscraper.sh 2019-10-08 22:20:13 INFO HTTP Server Thread started on port 8023 2019-10-08 22:20:17 INFO Writing Points to Influx: charge_state 2019-10-08 22:20:17 INFO Writing Points to Influx: climate_state 2019-10-08 22:20:17 INFO Writing Points to Influx: drive_state 2019-10-08 22:20:17 INFO Writing Points to Influx: gui_settings 2019-10-08 22:20:17 INFO Writing Points to Influx: vehicle_state 2019-10-08 22:20:17 INFO Asleep since: 0 Sleeping for 1 seconds.. Traceback (most recent call last): File "./apiscraper.py", line 426, in
car_active_state = state_monitor.ongoing_activity_status()
File "./apiscraper.py", line 120, in ongoing_activity_status
or self.old_values['charge_state'].get('charger_voltage', 0) > 0 or self.old_values['charge_state'].get('charger_actual_current', 0) > 0:
TypeError: '>' not supported between instances of 'NoneType' and 'int'
pi@raspberrypi:~ $
How do I fix this?