New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to fix: “UnicodeDecodeError: ‘ascii’ codec can’t decode byte” #9267
Comments
Hello! 👋 Thanks for opening your first issue here! ❤️ We will try to get back to you soon. 🚴🏽♂️ |
I'm not really familiar with the Nihon Kohden format, but the error occurs because the reader tries to decode a non-ASCII character:
I'm not sure why it is first decoded as ASCII and then converted to Unicode, because changing the whole line 249 to
would probably solve the problem. But again, I don't know if non-ASCII characters are allowed by the format. @fraimondo @larsoner any idea? |
Also, @leticiabragas2 the file |
Can you share all files that are part of the |
Hi, I'm having the same issue. Indeed, it is related to non-ASCII characters in the annotations. I attached Examplefiles.zip. EDFBrowser converts without issues, so it doesn't seem to be an issue of the .EEG format itself. The suggestion: As there is no way to suppress loading the annotations, the only way for me to load these files for now is to remove the annotations from the folder. |
see #9384 |
For EDF+, this is the text from the EDF+ specification (https://www.edfplus.info/specs/edfplus.html#header): The problem with NK files is that we do not have the specification. I've seen this problem with many formats too. #9384 might fix it, until a new encoding comes. |
Thanks for the prompt responses.
I have absolutely no idea how regularly the NK files might change. If you think that this might be practically hard to maintain, at least a flag to suppress the automatic reading of the annotations would be reasonable, I guess. |
feel free to take over. I tried to provide a way out. Unlikely I have time
to finish this myself this week
… |
...and I'm really grateful for that. I've never contributed to anything and have limited time myself at the moment. I can try, but this might take a while and I might need some guidance... |
It’s not about how they change, but what we find. We are working on a trial/error basis here. Having example files will help us determine which encodings are supported by the NK format.
… On 10 May 2021, at 10:55, MatthiasEb ***@***.***> wrote:
Thanks for the prompt responses.
#9384 <#9384> might fix it, until a new encoding comes.
I have absolutely no idea how regularly the NK files might change. If you think that this might be practically hard to maintain, at least a flag to suppress the automatic reading of the annotations would be reasonable, I guess.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#9267 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABCJDA2ZWDSXHKURPFEUJXTTM6NQJANCNFSM42TH2OLQ>.
|
Ah. Got it. Thanks. |
how to solve this problem?
linux operating system 18.01
The text was updated successfully, but these errors were encountered: