Error reading *.cnt eeg file

Iā€™m trying to read a cnt EEG file with mne.io.read_raw_cnt and get ā€œUnicodeDecodeError: ā€˜asciiā€™ codec canā€™t decode byte 0x93 in position 6: ordinal not in range(128)ā€,

When debugging, it looks like this

~/opt/anaconda3/lib/python3.7/site-packages/mne/io/utils.py in read_str(fid, count)
    242                              b'\x00' in data else count]])
    243 
--> 244     return str(bytestr.decode('ascii'))  # Return native str type for Py2/3
ipdb> bytestr
b'QXyK\x08o\x93v\xa6E'

any idea what to do?

are you using current master?

can you share the file?

are you sure itā€™s the correct cnt format? there are 2

Neuroscan CNT data format (.cnt) and ASA CNT formats.

both end .cnt

Alex

Hi
I have the exact same problem when trying to read an ASA cnt EEG file with mne.io.read_raw_cnt.
@kingjr did you fix it ?

Hello.
This is my problem too. I tried a lot to import some EEG data in .cnt format, But It was not successful. I always got the error below:

**return str(bytestr.decode('ascii'))  # Return native str type for Py2/3**

**UnicodeDecodeError: 'ascii' codec can't decode byte 0xc0 in position 1: ordinal not in range(128)**

It would be grateful if you or MNE team can help me in this manner.

Sorry for the belated reply. @leilaelam and @mahditaghaddosi can you confirm if your .cnt files are from Neuroscan device or ANTNeuro device? Both manufacturers use a .cnt file extension, but the files are different formats.

If youā€™re using ANTNeuro device: we have an open issue discussing support for ANTNeuro files: ENH: import ANT Neuro .CNT files (some code available) Ā· Issue #3609 Ā· mne-tools/mne-python Ā· GitHub On that thread, this comment nicely summarizes the currently available workarounds.

If youā€™re using Neuroscan device: we need a file that causes the error in order to be able to reproduce locally and debug. Can you provide such a file?

Cross-ref to recent, similar post: error mne.io.read_raw_cnt()