diff --git a/mne/_fiff/meas_info.py b/mne/_fiff/meas_info.py index 1714db42c47..587b1740034 100644 --- a/mne/_fiff/meas_info.py +++ b/mne/_fiff/meas_info.py @@ -2799,7 +2799,8 @@ def write_meas_info(fid, info, data_type=None, reset_range=True): if info.get("device_info") is not None: start_block(fid, FIFF.FIFFB_DEVICE) di = info["device_info"] - write_string(fid, FIFF.FIFF_DEVICE_TYPE, di["type"]) + if di.get("type") is not None: + write_string(fid, FIFF.FIFF_DEVICE_TYPE, di["type"]) for key in ("model", "serial", "site"): if di.get(key) is not None: write_string(fid, getattr(FIFF, "FIFF_DEVICE_" + key.upper()), di[key]) diff --git a/mne/conftest.py b/mne/conftest.py index 66197600270..2a54d1396c8 100644 --- a/mne/conftest.py +++ b/mne/conftest.py @@ -175,6 +175,8 @@ def pytest_configure(config): ignore:__array_wrap__ must accept context and return_scalar arguments.*:DeprecationWarning # nibabel <-> NumPy 2.0 ignore:__array__ implementation doesn't accept a copy.*:DeprecationWarning + # quantities via neo + ignore:The 'copy' argument in Quantity is deprecated.*: """ # noqa: E501 for warning_line in warning_lines.split("\n"): warning_line = warning_line.strip()