# UnicodeDecodeError in mne.io.read\_raw\_cnt()

**URL:** <https://mne.discourse.group/t/unicodedecodeerror-in-mne-io-read-raw-cnt/2296>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [August 25, 2020, 10:05am UTC](https://mne.discourse.group/t/unicodedecodeerror-in-mne-io-read-raw-cnt/2296 "2020-08-25T10:05:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [August 25, 2020, 10:05am UTC](https://mne.discourse.group/t/unicodedecodeerror-in-mne-io-read-raw-cnt/2296/1 "2020-08-25T10:05:58Z")

</div>

External Email - Use Caution

Hi MNE people!

I have a byte decoding error (UnicodeDecodeError) during the import of a ".cnt" EEG file.  
Do you know how to fix it?

Thanks !  
Jacques Pesnot Lerousseau.

File for reproduction of the error:  
[https://drive.google.com/drive/folders/1HS3576\_KgPDuUXvVH\_mXWivl8914rbgU?usp=sharing](https://drive.google.com/drive/folders/1HS3576_KgPDuUXvVH_mXWivl8914rbgU?usp=sharing)

Script:

import mne  
fname = '20200824\_1524.cnt'  
raw = mne.io.read\_raw\_cnt(fname)

Error:

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [August 25, 2020, 11:21am UTC](https://mne.discourse.group/t/unicodedecodeerror-in-mne-io-read-raw-cnt/2296/2 "2020-08-25T11:21:46Z")

</div>

External Email - Use Caution

Hello!

It seems like the string contains a ? character, which is not part of ASCII. We should probably use Latin-1 (aka ISO-8859-1) instead. I've created an issue to discuss at [https://github.com/mne-tools/mne-python/issues/8157](https://github.com/mne-tools/mne-python/issues/8157).

Thanks for your report!

Clemens
