Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reset database doesn't work #85

Open
spuder opened this issue Aug 21, 2018 · 3 comments
Open

reset database doesn't work #85

spuder opened this issue Aug 21, 2018 · 3 comments

Comments

@spuder
Copy link

spuder commented Aug 21, 2018

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.

47a3573

@spuder
Copy link
Author

spuder commented Aug 21, 2018

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'

@CerberusVelvet
Copy link

+1

Am experiencing same behaviour on a newly built set up.

@CerberusVelvet
Copy link

Stopped service
Removed /home/pi/delta5_race_timer/src/deltaserver/database.db
Started service

Problem solved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants