From 83c2d9048df6af2f0b3da10233ad477294d7e92a Mon Sep 17 00:00:00 2001 From: Jacob Woessner Date: Thu, 5 Dec 2024 16:53:21 -0600 Subject: [PATCH] Fix cnt warnings --- mne/io/cnt/cnt.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/mne/io/cnt/cnt.py b/mne/io/cnt/cnt.py index 4fe505422aa..bdb878c38f8 100644 --- a/mne/io/cnt/cnt.py +++ b/mne/io/cnt/cnt.py @@ -14,7 +14,13 @@ from ..._fiff.utils import _create_chs, _find_channels, _mult_cal_one, read_str from ...annotations import Annotations from ...channels.layout import _topo_to_sphere -from ...utils import _check_option, _validate_type, fill_doc, warn +from ...utils import ( + _check_option, + _validate_type, + fill_doc, + warn, + _explain_exception +) from ..base import BaseRaw from ._utils import ( CNTEventType3, @@ -547,7 +553,8 @@ def __init__( ) except Exception: raise RuntimeError( - "Could not read header from *.cnt file. mne.io.read_raw_cnt " + f"{_explain_exception()}\n" + "WARNING: mne.io.read_raw_cnt " "supports Neuroscan CNT files only. If this file is an ANT Neuro CNT, " "please use mne.io.read_raw_ant instead." )