Can't save new files in Ubuntu

All of a sudden when I tag music and try to save it the files show an error.

This is from the Log:

E: 23:52:21 Traceback (most recent call last):

File "/usr/lib/picard/picard/util/", line 46, in run

result = self.func()

File "/usr/lib/picard/picard/", line 210, in _save_and_rename

self._save(old_filename, metadata)

File "/usr/lib/picard/picard/formats/", line 212, in _save


File "/usr/lib/python2.7/dist-packages/mutagen/", line 170, in update

self.__setitem__(key, value)

File "/usr/lib/python2.7/dist-packages/mutagen/", line 307, in __setitem__

raise ValueError


Using Ubuntu 16.04 and Picard 1.42 from the PPA

Any and all help appreciated!!

This error keys indicates that one of your tags is not valid as a key to be stored in Vorbis tags. One recently reported cause for this can be if you have ratings enabled and your rating e-mail does contain invalid characters, see

Apart from that please check your scripting if you have any $set() call that might set something weird.

1 Like


Thanks for the quick response. YEah, the problem was in a script I had. Both of the following lines seem to result in the error:


Thanks for the tip!!

PS I had been running this script for years with no problem… Any idea why this changed?

Nothing changed code-wise, what likely changed here was the values you wrote. Probably your are now tagging files that actually have something set as performer or comment. The script above does not do what you probably think it does.

If you write $set(%performer%,%artist%), this will set a tag where the name is the value of performer and the value of the tag is the value of artist. As an example, let’s assume the artist is set to “The Beatles” and performer is set to “Paul McCartney”. Your script will create a tag Paul McCartney=The Beatles, not performer=The Beatles.

The correct way to write this script would be: