[Bug] Cannot write tags to file for some .aif files

Lexicon version: 1.5.10
Operating system: Windows 11 Pro 22631.3085

Bug description:
For some files the tags cannot be written to the file tags and an error is reported

Step by step to reproduce:

Right-Click > Use > Write tags to file

Screenshot: n/a

Error:

Generated on 2024-01-30 19:30
Write Tags Report
Enabled fields: title, artist, label, remixer, comment, key, genre, bpm, year
(No change) (Error: failed: C:/Users/q1r1n/OneDrive/Unsecure/Music/Library/A & Z - 8 Years Later (Extended Mix)_pn.aif
Traceback (most recent call last):
  File "tagger.py", line 70, in <module>
  File "serato\write.py", line 34, in write_tags
  File "serato\filetypes\aiff.py", line 165, in write_tags
  File "lib\site-packages\mutagen\_util.py", line 156, in wrapper
  File "lib\site-packages\mutagen\_file.py", line 132, in save
  File "lib\site-packages\mutagen\_util.py", line 185, in wrapper
  File "lib\site-packages\mutagen\_util.py", line 156, in wrapper
  File "lib\site-packages\mutagen\_iff.py", line 363, in save
  File "lib\site-packages\mutagen\_iff.py", line 338, in insert_chunk
  File "lib\site-packages\mutagen\_iff.py", line 260, in insert_chunk
  File "lib\site-packages\mutagen\_util.py", line 788, in insert_bytes
ValueError
)

Additional comment: initially I thought the brackets in the filename was the root cause but for some other files with brackets it works.
See the full report in attachment:
Write Tags 2024-01-30.txt (557.1 KB)

Can you make a screenshot of Lexicon showing that track with all those columns enabled?

Here you are:

Thanks. Nothing stands out there so I think it might be related to the file. Could be a broken header. Can you upload it?
You can upload with this link: http://upload.lexicondj.com

I think you might be right. After investigating, I identified 505 tracks affected by the problem. And I know some of these tracks were perfectly fine 2 days ago because I manually re-tagged them. Also my PC froze during a tag mass update I was doing from Lexicon. It could be the root cause.

I uploaded the track for you to confirm:

Something is wrong somewhere: I have about 350 tracks that were correctly tagged last week that now have lost their tags. And Lexicon cannot recreate the tags. The only features have been using were the "Find tags and album art"as well as “Write tags to file”.

Just tested your AIFF file and it is definitely broken. Lexicon deletes the broken header and then tries to re-write it (and that normally fixes it with a working header) but in this case, the AIFF file is broken that it can’t even do that.

I used kid3 to add a new ID3 tag and after that, it works normally. So definitely broken files

As for what you can do to fix them, I would use a program like dbPoweramp (or ffmpeg if you are technical) and re-encode the files in-place. So replace the original files with the new version, should fix the headers

Thanks @Christiaan. I will do that. I think we can consider this bug report closed as I am not able to confirm that Lexicon is the culprit.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.