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

rqt_bag VALUE_ERROR on canceling load prematurely (without selecting a bag to open) #99

Open
moslemk opened this issue Mar 4, 2021 · 0 comments · May be fixed by #100
Open

rqt_bag VALUE_ERROR on canceling load prematurely (without selecting a bag to open) #99

moslemk opened this issue Mar 4, 2021 · 0 comments · May be fixed by #100

Comments

@moslemk
Copy link

moslemk commented Mar 4, 2021

Affected Versions

Latest master, 0.5.1, 0.5.0, and most probably prior versions too

Symptoms

When canceling on loading a bag (i.e., not selecting a bag to load) the code errors out:

Traceback (most recent call last):
  File "/home/moslemk/projects/catkin_ws/src/rqt_bag/rqt_bag/src/rqt_bag/bag_widget.py", line 283, in _handle_load_clicked
    self._timeline._timeline_frame._layout()
  File "/home/moslemk/projects/catkin_ws/src/rqt_bag/rqt_bag/src/rqt_bag/timeline_frame.py", line 392, in _layout
    new_history_bottom = max([y + h for (_, y, _, h) in self._history_bounds.values()]) - 1
ValueError: max() arg is an empty sequence

Root cause

This happens due to trying to get the layout updated with no values due to invalid (none) filename:

self._timeline._timeline_frame._layout()

Possible fix

Checking the filename prior to that line (in `_handle_load_clicked) and returning early.

@moslemk moslemk linked a pull request Mar 4, 2021 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant