Can't save files (‘latin-1’ codec can’t encode character ‘\u0131’ in position 19: ordinal not in range(256))

Tags: #<Tag:0x00007f0ea76d7b50> #<Tag:0x00007f0ea76d7a10> #<Tag:0x00007f0ea76d7948>

I’m re-tagging my library atm and I get this error a lot lately. Not in a flac or ogg file, always in a mp3 file.
Just downloading and get the same error. Is that related to python? Does anybody reproduce that error?

E: 10:33:56,794 util\ Traceback (most recent call last):
File “util\”, line 60, in run
File “”, line 329, in _save_and_rename
File “formats\”, line 541, in _save
File “formats\”, line 648, in _save_tags
File “”, line 185, in wrapper
File “”, line 156, in wrapper
File “mutagen\”, line 262, in save
File “mutagen\”, line 195, in _prepare_data
File “mutagen\”, line 190, in _write
File “mutagen\”, line 190, in
File “mutagen\”, line 506, in save_frame
File “mutagen\”, line 211, in _writeData
File “mutagen\”, line 576, in write
UnicodeEncodeError: ‘latin-1’ codec can’t encode character ‘\u0131’ in position 19: ordinal not in range(256)

E: 10:33:56,797 ui\item.error_append:96: <MP3File ‘01.Fexomat_and_Sumone_-_Golden_Days_remix.mp3’>: ‘latin-1’ codec can’t encode character ‘\u0131’ in position 19: ordinal not in range(256)

We will need to know your operating system type / version and Picard version number and your settings for the following options:

Metadata / Convert Unicode punctuation characters to ASCII
Tags / ID3 / ID3 version, ID3v2 text encoding


Windows 10 Enterprise LTC Version: 1809 OS Build: 17763.1879
Picard 2.6.2

Convert Unicode punctuation characters to ASCII: unchecked
ID3 version: 2.3; ID3v2 text encoding: UTF-16

Ok - I downloaded the file and added it to Picard and it appeared in the Unclustered Files. It has a little metadata.

What did you do then before hitting save?

Thanks to AcoustID, It identifies as this

After that I try to save file and

This is really odd. Two things are really strange:

  • The character in the exception message is a “ı” (Latin Small Letter Dotless I), I can’t see this anywhere in the tags
  • Your setting is UTF-16 for encoding. There are a few ID3 frames that get saved with latin1 anyway, such as TRCK and TPOS for track and disc number, but Picard makes sure to only allow characters that can be encoded

I also can’t reproduce (but I have only tested on Linux so far). My first suspicion was that it maybe is something already in the file, but then I would have assumed I could reproduce it.

Which plugins or scripts do you use? Maybe anything that directly sets some %_id3:*% vafriable?

1 Like

Could you check what you have set in Options > Metadata > Rating for the e-mail and whether this contains something odd? This is supposed to be Latin1 only according to the mutagen code. I can reproduce your stack trace when I add e.g. “ı” into this field.

1 Like

My e-mail address is from English alphabet.

My Plugins are:
Add Cluster As Release
Amazon Cover Art
Copy Cluster to Clipboard
Feat. Artists in Titles
Standardise Feat.
and I only have Single Disc script, which is “$if($eq(%totaldiscs%,1),$unset(totaldiscs)$unset(discnumber))”

Ok, odd. There are a couple of possible ID3 frames that could cause this, but as far as I can see they either are handled by Picard to avoid this encoding issue, are not supported by Picard or it’s not really possible to set the value freely. The one exception I found was the POPM frame for storing the rating. I will try to find some other way to trigger this issue


Also most of the errored tracks have ratings in my library.
I have local rating on and get an error while tagging. When I download again to different folder, I get the same error.

1 Like

This is the very strange part. So you make a fresh download, and tagging it the first time with Picard already triggers the error, right?

I have not yet had the time to search for another cause of this issue. For the one related to ratings I added a ticket at , but unfortunately that does not seem to be the issue you experience.

1 Like

Yes, that’s right outsidecontext.

I just clean upgrade my OS to 20H2, and the error is now gone, everthing is running smooth.

1 Like