From 701654f0911882448ccb35ea2a16a6bc3cdf45c9 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Mon, 3 Feb 2025 17:15:18 +0100 Subject: [PATCH] Fix EEGLAB import (nodatchans) --- mne/io/eeglab/eeglab.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mne/io/eeglab/eeglab.py b/mne/io/eeglab/eeglab.py index 3aa611b4e28..10e23b811a0 100644 --- a/mne/io/eeglab/eeglab.py +++ b/mne/io/eeglab/eeglab.py @@ -162,7 +162,7 @@ def _get_montage_information(eeg, get_pos, *, montage_units): ) lpa, rpa, nasion = None, None, None - if hasattr(eeg, "chaninfo") and isinstance(eeg.chaninfo["nodatchans"], dict): + if hasattr(eeg, "chaninfo") and isinstance(eeg.chaninfo.get("nodatchans"), dict): nodatchans = eeg.chaninfo["nodatchans"] types = nodatchans.get("type", []) descriptions = nodatchans.get("description", [])