mne-tools / mne-bids

MNE-BIDS is a Python package that allows you to read and write BIDS-compatible datasets with the help of MNE-Python.
https://mne.tools/mne-bids/
BSD 3-Clause "New" or "Revised" License
126 stars 84 forks source link

issue with CI and inspect module #1250

Closed sappelhoff closed 1 month ago

sappelhoff commented 2 months ago
          @drammock @hoechenberger I think this is the failure that threw me off recently: https://github.com/mne-tools/mne-bids/actions/runs/9106401009/job/25033546552#step:20:1185

FAILED mne_bids/tests/test_inspect.py::test_inspect_single_file[True] - matplotlib._api.deprecation.MatplotlibDeprecationWarning: Auto-close()ing of figures upon backend switching is deprecated since 3.8 and will be removed in 3.10. To suppress this warning, explicitly call plt.close('all') first. FAILED mne_bids/tests/test_inspect.py::test_inspect_single_file[False] - UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown

Originally posted by @sappelhoff in https://github.com/mne-tools/mne-bids/issues/1245#issuecomment-2114663602

sappelhoff commented 2 months ago

I can replicate this locally on macos 14.4.1 (M2 chip).

larsoner commented 2 months ago

I suggest trying adding these lines to your conftest.py

https://github.com/mne-tools/mne-python/blob/5c2a25567e5e1613c204ad40be58bf483db6a99e/mne/conftest.py#L203-L210

sappelhoff commented 2 months ago

issue occurs on Windows as well, as evidenced by CI logs in https://github.com/mne-tools/mne-bids/pull/1252