diff --git a/doc/whats_new.rst b/doc/whats_new.rst index f86c2fc0d..bda6a7b72 100644 --- a/doc/whats_new.rst +++ b/doc/whats_new.rst @@ -61,6 +61,8 @@ Detailed list of changes - Suppress superfluous warnings about MaxShield in many functions when handling Elekta/Neuromag/MEGIN data, by `Richard Höchenberger`_ (:gh:`1000`) +- The MNE-BIDS Inspector didn't work if ``mne-qt-browser`` was installed and used as the default plotting backend, as the Inspector currently only supports the Matplotlib backend, by `Richard Höchenberger`_ (:gh:`1007`) + :doc:`Find out what was new in previous releases ` .. include:: authors.rst diff --git a/mne_bids/inspect.py b/mne_bids/inspect.py index 15df15189..0c6fec6b7 100644 --- a/mne_bids/inspect.py +++ b/mne_bids/inspect.py @@ -12,6 +12,7 @@ from mne.utils import logger, verbose from mne.fixes import _compare_version +from mne.viz import use_browser_backend if _compare_version(mne.__version__, '<', '1.0.dev0'): # pragma: no cover from mne.preprocessing import annotate_flat @@ -155,10 +156,14 @@ def _inspect_raw(*, bids_path, l_freq, h_freq, find_flat, show_annotations): flat_chans = [] show_options = bids_path.datatype == 'meg' - fig = raw.plot(title=f'{bids_path.root.name}: {bids_path.basename}', - highpass=l_freq, lowpass=h_freq, - show_options=show_options, - block=False, show=False, verbose='warning') + + with use_browser_backend('matplotlib'): + fig = raw.plot( + title=f'{bids_path.root.name}: {bids_path.basename}', + highpass=l_freq, lowpass=h_freq, + show_options=show_options, + block=False, show=False, verbose='warning' + ) # Add our own event handlers so that when the MNE Raw Browser is being # closed, our dialog box will pop up, asking whether to save changes.