Skip to content

KeyError when updating the chart #210

@harshil21

Description

@harshil21

Describe the bug

The UI crashed randomly. I was still in the UI, however all the graphs and information were not being updated. I was using GPS RTK.

Please specify the pygpsclient version (`pygpsclient -V) and, where possible, include:

pygpsclient 1.5.13

  • The error message and full traceback.
Exception in Tkinter callback
Traceback (most recent call last):
  File "/home/harshil/.local/share/uv/python/cpython-3.13.6-linux-x86_64-gnu/lib/python3.13/tkinter/__init__.py", line 2068, in __call__
    return self.func(*args)
           ~~~~~~~~~^^^^^^^
  File "/home/harshil/Documents/PinPointer/.venv/lib/python3.13/site-packages/pygpsclient/app.py", line 649, in on_gnss_read
    self.process_data(raw_data, parsed_data)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/harshil/Documents/PinPointer/.venv/lib/python3.13/site-packages/pygpsclient/app.py", line 861, in process_data
    getattr(self, self.widget_state.state[WDGCHART][FRAME]).update_data(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        parsed_data
        ^^^^^^^^^^^
    )
    ^
  File "/home/harshil/Documents/PinPointer/.venv/lib/python3.13/site-packages/pygpsclient/chart_frame.py", line 501, in update_data
    self._chart_data.pop(0)
    ~~~~~~~~~~~~~~~~~~~~^^^
KeyError: 0
  • A binary / hexadecimal dump of the UBX data stream (e.g. from PuTTY or screen).

(I don't have this sorry)

To Reproduce

Steps to reproduce the behaviour:

  1. Any relevant device configuration (if other than factory defaults).
  2. Any causal UBX command input(s).

Expected Behaviour

A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

  • The operating system you're using [e.g. Windows 11, MacOS Ventura, Ubuntu Kinetic]

Arch Linux, 6.16.7-arch1-1

  • The version of Python you're using (e.g. Python 3.11.1)

3.13.6

  • The type of serial connection [e.g. USB, UART1]

USB

GNSS/GPS Device (please complete the following information as best you can):

  • Device Model/Generation: Quectel LC29H (DA)
Image

Additional context

I was testing GPS RTK from serial, both my base station and rover connected to my PC. It was working but for some reason the UI for the rover crashed after ~ an hour of testing.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions