You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I imported recent MoNA data and wanted to store this as .mgf.
This gave me the following error: UnicodeEncodeError: 'charmap' codec can't encode character '\u2070' in position 102: character maps to <undefined>
I believe this came from the msp imported spectrum below:
Actually, not so sure anymore where this came from. Might also have happened during cleaning. Maybe pubchem lookup?
I will check where this occurred to better reproduce this. Then see if we have to introduce something like x.encode('utf-8','ignore').decode("utf-8") anywhere.
For loading MSP files we could change:
with open(filename, 'r', encoding='utf-8') as f:
in line 58 to
with open(filename, 'r', encoding='utf-8', errors="ignore") as f:
to just remove these characters.
However MGF file loading happens in another package I believe, so I am not sure how we could fix that.
I imported recent MoNA data and wanted to store this as
.mgf
.This gave me the following error:
UnicodeEncodeError: 'charmap' codec can't encode character '\u2070' in position 102: character maps to <undefined>
I believe this came from the msp imported spectrum below:
The text was updated successfully, but these errors were encountered: