Find out which file is generating an error on upload


I just updated the tags of all my library to version 2.4 if id3tag but I’m still getting errors.
Such as:

UnicodeDecodeError: ‘utf-16-le’ codec can’t decode bytes in position 0-1: illegal UTF-16 surrogate
track.beats_per_minute = round(float(metadata.tags.bpm[0]))
ValueError: could not convert string to float: ‘㜀㈀’

Is there any way to find out which files are generating this errors so I can go in and fix them manually?

My library is 8800 files so checking them one by one is not feasible.


I haven’t had time to tackle this issue yet.

Until then, I have this script to test loading of files with audio-metadata. It will try to load files in the directory it’s run recursively and print any filepaths it fails to load.

As for the second one, it should actually fail loading but doesn’t yet because I haven’t finished adding validation to all the ID3 frame types. So, that one won’t pop up with the test script. Though it could be modified to do so.