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

Lap times don't always calculate correctly #18

Open
randyzwitch opened this issue Nov 26, 2018 · 0 comments
Open

Lap times don't always calculate correctly #18

randyzwitch opened this issue Nov 26, 2018 · 0 comments

Comments

@randyzwitch
Copy link

During time trial, if I cancel out of the session then CTRL-C to cancel the listener, I get the following:

^CTraceback (most recent call last):
  File "cli.py", line 34, in listen
    telemetry.save_data()
  File "/home/randyzwitch/github_work/pytelemetry/pytelemetry/listen.py", line 85, in save_data
    for packet_type, packet_data in self.listen():
  File "/home/randyzwitch/github_work/pytelemetry/pytelemetry/listen.py", line 54, in listen
    data, _ = self.socket.recvfrom(self.buffer_size)
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "cli.py", line 58, in <module>
    CLI()
  File "cli.py", line 28, in __init__
    getattr(self, command)()
  File "cli.py", line 36, in listen
    telemetry.save_before_exit()
  File "/home/randyzwitch/github_work/pytelemetry/pytelemetry/listen.py", line 107, in save_before_exit
    f.write("Lap {}: {}\n".format(k, get_lap_time(v)))
  File "/home/randyzwitch/github_work/pytelemetry/pytelemetry/helpers.py", line 7, in get_lap_time
    time, speed, throttle, steer, brake, clutch, gear, engine, drs = zip(*data)
ValueError: not enough values to unpack (expected 9, got 0)

Not sure how I'm supposed to shut down the listener, but I have seen the lap times work before

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

1 participant