Skip to content

Stop animation before switching plot method #10

@Chilipp

Description

@Chilipp

When running a animation and changing the plot method, psy-view crashes, see the following screencast

ezgif-4-0e1bf614660f

The error message in the terminal is

Traceback (most recent call last):
  File "/home/psommer/miniconda3/envs/work/lib/python3.7/site-packages/matplotlib/backend_bases.py", line 1187, in _on_timer
    ret = func(*args, **kwargs)
  File "/home/psommer/miniconda3/envs/work/lib/python3.7/site-packages/matplotlib/animation.py", line 1449, in _step
    still_going = Animation._step(self, *args)
  File "/home/psommer/miniconda3/envs/work/lib/python3.7/site-packages/matplotlib/animation.py", line 1168, in _step
    framedata = next(self.frame_seq)
  File "/home/psommer/miniconda3/envs/work/lib/python3.7/site-packages/matplotlib/animation.py", line 1672, in iter_frames
    yield from this
  File "/home/psommer/Documents/code/development/psy-view/psy_view/ds_widget.py", line 418, in animation_frames
    i = self.data.psy.idims[dim]
  File "/home/psommer/Documents/code/development/psy-view/psy_view/ds_widget.py", line 604, in data
    return self.plotmethod_widget.data
  File "/home/psommer/Documents/code/development/psy-view/psy_view/ds_widget.py", line 865, in data
    return self.sp[0]
  File "/home/psommer/Documents/code/development/psyplot/psyplot/project.py", line 637, in __getitem__
    ret = super(Project, self).__getitem__(key)
  File "/home/psommer/Documents/code/development/psyplot/psyplot/data.py", line 4477, in __getitem__
    return super(ArrayList, self).__getitem__(key)
IndexError: list index out of range
Aborted (core dumped)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions