mne-tools / mne-python

MNE: Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python
https://mne.tools
BSD 3-Clause "New" or "Revised" License
2.73k stars 1.33k forks source link

do not log about using set_montage AGAIN if it has never been used #12984

Closed sappelhoff closed 2 hours ago

sappelhoff commented 6 hours ago
larsoner commented 4 hours ago

Marking for merge-when-green, thanks in advance @sappelhoff !

larsoner commented 4 hours ago

Failure looks related

_____________________________ test_add_reorder[2] ______________________________
E   Failed: DID NOT WARN. No warnings of type (<class 'RuntimeWarning'>,) matching the regex were emitted.
     Regex: locations of multiple
     Emitted warnings: [ RuntimeWarning('Location for this channel is unknown or ambiguous; consider calling set_montage() after adding new reference channels if needed. Applying a montage will only set locations of channels that exist at the time it is applied.')].
All traceback entries are hidden. Pass `--full-trace` to see hidden and internal frames.

During handling of the above exception, another exception occurred:
mne/_fiff/tests/test_reference.py:900: in test_add_reorder
    with ctx:
E   RuntimeWarning: Location for this channel is unknown or ambiguous; consider calling set_montage() after adding new reference channels if needed. Applying a montage will only set locations of channels that exist at the time it is applied.