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

Issue Getting Delta5 to work #90

Open
blakermchale opened this issue Nov 27, 2018 · 4 comments
Open

Issue Getting Delta5 to work #90

blakermchale opened this issue Nov 27, 2018 · 4 comments

Comments

@blakermchale
Copy link

I've been trying to get the app to run by following the Software Setup Guide, but when in the settings this error keeps occurring.
This only happens in the settings, and I'm unable to add pilots or heats.
None of python files were changed after cloning

Any help would be appreciated.
Thanks.

Client connected
connect handler error
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/engineio/server.py", line 423, in _trigger_event
    return self.handlers[event](*args)
  File "/usr/local/lib/python2.7/dist-packages/socketio/server.py", line 503, in _handle_eio_connect
    return self._handle_connect(sid, '/')
  File "/usr/local/lib/python2.7/dist-packages/socketio/server.py", line 421, in _handle_connect
    self.environ[sid]) is False:
  File "/usr/local/lib/python2.7/dist-packages/socketio/server.py", line 490, in _trigger_event
    return self.handlers[namespace][event](*args)
  File "/usr/local/lib/python2.7/dist-packages/flask_socketio/__init__.py", line 251, in _handler
    *args)
  File "/usr/local/lib/python2.7/dist-packages/flask_socketio/__init__.py", line 632, in _handle_event
    ret = handler()
  File "server.py", line 339, in connect_handler
    emit_leaderboard() # Race page, load leaderboard for current laps
  File "server.py", line 835, in emit_leaderboard
    heat_id=RACE.current_heat, node_index=node).first().pilot_id
AttributeError: 'NoneType' object has no attribute 'pilot_id'

@floriangaller
Copy link

floriangaller commented Nov 28, 2018

Hello,

I can confim that I have the same issue: I started with a clean install of raspbian strech Version: November 2018 Release date: 2018-11-13 and installed Delta 5 according to the instructions :"Hardware and Software Setup Instructions". I also tried different browsers: Firefox, Chrome still the same issue. I'm also unable to shut down the raspi by the gui buttons. Furthermore, all the calibration values fields are empty. The connection to the arduinos seems to work fine... (when i connect them they get shown in the setting tab. However, it is not possible to assign frequencies.)
Also the timingserver used for the connection to Livetime doesn't work.

If anybody can offer help it would be highly appreciated

Thanks

edit: i removed the sercive agian and tried to start it by python server.py in the delta5_race_timer/src/delta5server/
and the python program terminates with an error after finding the Nodes:
pi@lapcounter:~/delta5_race_timer/src/delta5server $ python server.py
Node FOUND at address 8
Node FOUND at address 10
Node FOUND at address 12
Node FOUND at address 14
No node at address 16
No node at address 18
No node at address 20
No node at address 22
Number of nodes found: 4
Default frequencies set
Traceback (most recent call last):
File "server.py", line 1213, in
db_reset_current_laps()
File "server.py", line 1151, in db_reset_current_laps
DB.session.query(CurrentLap).delete()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 3353, in delete
delete_op.exec_()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1335, in exec_
self._do_exec()
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1527, in _do_exec
self._execute_stmt(delete_stmt)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1342, in _execute_stmt
mapper=self.mapper)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1187, in execute
bind, close_with_result=True).execute(clause, params or {})
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 948, in execute
return meth(self, multiparams, params)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 269, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1060, in _execute_clauseelement
compiled_sql, distilled_params
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1200, in _execute_context
context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1413, in _handle_dbapi_exception
exc_info
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 265, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1193, in _execute_context
context)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 509, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) attempt to write a readonly database [SQL: u'DELETE FROM current_lap'] (Background on this error at: http://sqlalche.me/e/e3q8)

edit2: as it seamed at first glance like a problem accessing the database i gave the src folder a recursive chmod 777 such that all files can be accessed. Thereby, the previous error disappers however the GUI still doesn't work.

@scottgchin
Copy link
Owner

Did you notice any errors during the requirements.txt install portion? If you're looking for an easier method, there is an sd card image file made from my install on the pinned post of the facebook post. Just write it to your sd card, and it should have everything configured. Just a note my sd card was a 32gb card.

@floriangaller
Copy link

floriangaller commented Nov 29, 2018

I didn't noticed any errory during the install of requirements.txt and if i ran this command again it writes out that everything is allready installed... I have no facebook account and, therfore, i will try now the image from https://github.com/spuder/pi-gen

The image from https://github.com/spuder/pi-gen did not work either...

However i tried a new install of raspian and it worked now.
I have no clue what i made different.
Thank you for your support

@martinglass
Copy link

martinglass commented Jan 11, 2020

Did you notice any errors during the requirements.txt install portion? If you're looking for an easier method, there is an sd card image file made from my install on the pinned post of the facebook post. Just write it to your sd card, and it should have everything configured. Just a note my sd card was a 32gb card.

Hi Scott, I'm getting similar issues.

I've got it working now. Not quite sure how, but here are some of the steps
I downgraded from the RPi 3 Model B+ to the standard RPi 3 Model B and started again. I followed all the instructions and everything went well without errors. But the web server still wouldn't serve.

I then removed the whole delta5_race_timer directory
rm -r ~/delta5_race_timer
... and reinstalled it
cd ~
git clone https://github.com/scottgchin/delta5_race_timer.git
cd /home/pi/delta5_race_timer/src
sudo chmod 777 delta5server
sudo reboot

After the reboot, it all sprung to life.

I'm not sure what went wrong, but I think the database got corrupted in the first install and the second re-install started with a clean one.

Maybe, I'm missing the mark, but anyway, in case it's any use to anyone else, this worked for me (after a lot of trial and error).

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

4 participants