import os
import mne
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
os.chdir("D:/222experiment_material/EEG_DATA")
print(os.getcwd())
file_path = './practice/hulike/data/MC_H01.set'
raw = mne.read_epochs_eeglab(file_path)
print(raw.info)
TypeError Traceback (most recent call last)
Cell In[4], line 2
1
----> 2 raw = mne.read_epochs_eeglab(file_path)
File D:\Python\Anaconda3\lib\site-packages\mne\io\eeglab\eeglab.py:337, in read_epochs_eeglab(input_fname, events, event_id, eog, uint16_codec, montage_units, verbose)
288 @fill_doc
289 def read_epochs_eeglab(input_fname, events=None, event_id=None,
290 eog=(), *, uint16_codec=None, montage_units='mm',
291 verbose=None):
292 r"""Reader function for EEGLAB epochs files.
293
294 Parameters
(...)
335 .. versionadded:: 0.11.0
336 """
--> 337 epochs = EpochsEEGLAB(input_fname=input_fname, events=events, eog=eog,
338 event_id=event_id, uint16_codec=uint16_codec,
339 montage_units=montage_units, verbose=verbose)
340 return epochs
File <decorator-gen-296>:12, in __init__(self, input_fname, events, event_id, tmin, baseline, reject, flat, reject_tmin, reject_tmax, eog, uint16_codec, montage_units, verbose)
File D:\Python\Anaconda3\lib\site-packages\mne\io\eeglab\eeglab.py:569, in EpochsEEGLAB.__init__(self, input_fname, events, event_id, tmin, baseline, reject, flat, reject_tmin, reject_tmax, eog, uint16_codec, montage_units, verbose)
567 logger.info('Extracting parameters from %s...' % input_fname)
568 scale_units = _handle_montage_units(montage_units)
--> 569 info, eeg_montage, _ = _get_info(eeg, eog=eog, scale_units=scale_units)
571 for key, val in event_id.items():
572 if val not in events[:, 2]:
File D:\Python\Anaconda3\lib\site-packages\mne\io\eeglab\eeglab.py:199, in _get_info(eeg, eog, scale_units)
196 if eeg_has_ch_names_info:
197 has_pos = _eeg_has_montage_information(eeg)
198 ch_names, ch_types, eeg_montage = \
--> 199 _get_montage_information(eeg, has_pos, scale_units=scale_units)
200 update_ch_names = False
201 else: # if eeg.chanlocs is empty, we still need default chan names
File D:\Python\Anaconda3\lib\site-packages\mne\io\eeglab\eeglab.py:150, in _get_montage_information(eeg, get_pos, scale_units)
148 lpa, rpa, nasion = None, None, None
149 if hasattr(eeg, "chaninfo") and len(eeg.chaninfo.get('nodatchans', [])):
--> 150 for item in list(zip(*eeg.chaninfo['nodatchans'].values())):
151 d = dict(zip(eeg.chaninfo['nodatchans'].keys(), item))
152 if d.get("type", None) != 'FID':
TypeError: 'int' object is not iterable
My document can be read in MATLAB without any issues, it is likely that there are no problems with it.