Skip to content

Conversation

@larsoner
Copy link
Member

Fixes:

Traceback (most recent call last):
  File "/home/larsoner/python/matplotlib/lib/matplotlib/cbook/__init__.py", line 256, in process
    func(*args, **kwargs)
  File "/home/larsoner/python/mne-python/mne/viz/_figure.py", line 662, in _keypress
    self._redraw()
  File "/home/larsoner/python/mne-python/mne/viz/_figure.py", line 2122, in _redraw
    self._update_data()
  File "/home/larsoner/python/mne-python/mne/viz/_figure.py", line 1925, in _update_data
    this_data = _filtfilt(
  File "/home/larsoner/python/mne-python/mne/filter.py", line 433, in _filtfilt
    x, orig_shape, picks = _prep_for_filtering(x, copy, picks)
  File "/home/larsoner/python/mne-python/mne/filter.py", line 272, in _prep_for_filtering
    picks = _picks_to_idx(x.shape[-2], picks)
  File "/home/larsoner/python/mne-python/mne/io/pick.py", line 1061, in _picks_to_idx
    raise ValueError('No appropriate channels found for the given picks '
ValueError: No appropriate channels found for the given picks (None)

by short-circuiting the filter loop (over filterable time segments) when none of the currently shown channels are data channels.

@drammock drammock merged commit 52ebe72 into mne-tools:main Feb 24, 2021
@drammock
Copy link
Member

thx @larsoner

@larsoner larsoner deleted the plot branch February 24, 2021 20:44
marsipu pushed a commit to marsipu/mne-python that referenced this pull request Feb 25, 2021
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 this pull request may close these issues.

2 participants