delta5_race_timer
delta5_race_timer copied to clipboard
reset database doesn't work
Running the latest code as of a couple of days ago. When I click 'reset database' it asks me to login and then refreshes the page, but the database didn't reset because I still see pilots and heats.
47a35739f8de409c27af11655828dc35512c076c
Looking at the logs, it now gives me error
'NoneType' object has no attribute 'pilot_id'
root@delta5:/opt/delta5# systemctl status delta5.service
● delta5.service - Delta5 Server
Loaded: loaded (/lib/systemd/system/delta5.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2018-08-21 01:47:26 UTC; 42s ago
Main PID: 943 (python)
CGroup: /system.slice/delta5.service
├─943 /usr/bin/python server.py
└─949 /usr/bin/python server.py
Aug 21 01:48:05 delta5 python[943]: return self.handlers[namespace][event](*args)
Aug 21 01:48:05 delta5 python[943]: File "/usr/local/lib/python2.7/dist-packages/flask_socketio/__init__.py", line 2
Aug 21 01:48:05 delta5 python[943]: *args)
Aug 21 01:48:05 delta5 python[943]: File "/usr/local/lib/python2.7/dist-packages/flask_socketio/__init__.py", line 6
Aug 21 01:48:05 delta5 python[943]: ret = handler()
Aug 21 01:48:05 delta5 python[943]: File "server.py", line 258, in connect_handler
Aug 21 01:48:05 delta5 python[943]: emit_leaderboard() # Race page, load leaderboard for current laps
Aug 21 01:48:05 delta5 python[943]: File "server.py", line 721, in emit_leaderboard
Aug 21 01:48:05 delta5 python[943]: heat_id=RACE.current_heat, node_index=node).first().pilot_id
Aug 21 01:48:05 delta5 python[943]: AttributeError: 'NoneType' object has no attribute 'pilot_id'
+1
Am experiencing same behaviour on a newly built set up.
Stopped service Removed /home/pi/delta5_race_timer/src/deltaserver/database.db Started service
Problem solved!