Closed tweitzel closed 8 years ago
Just tested on beets 1.3.19 and mutagen 1.34.1, still there.
pip list output:
abzsubmit (0.1) alabaster (0.7.9) anyjson (0.3.3) appdirs (1.4.0) astroid (1.3.6) audioread (1.0.1) autopep8 (1.1.1) Babel (2.3.4) backports.ssl-match-hostname (3.4.0.2) BeautifulSoup (3.2.1) beautifulsoup4 (4.3.2) beets (1.3.19) beets-check (0.9.2) beetsplug.badfiles (0.0.0) bitstring (3.1.3) boto (2.36.0) boxsdk (1.5.3) certifi (14.5.14) cffi (1.1.2) click (5.1) control (0.7.0) cryptography (0.9.1) decorator (3.4.2) discogs-client (2.2.1) Django (1.6.5) dnspython (1.12.0) docopt (0.6.2) docutils (0.12) enum34 (1.1.6) evernote (1.25.0) fbconsole (0.4) feedparser (5.1.3) Flask (0.10.1) futures (3.0.3) geeknote (0.2a0) gmusicapi (5.0.0) gpsoauth (0.0.2) html2text (3.200.3) httplib2 (0.9.1) idna (2.0) imagesize (0.7.1) ipaddr (2.1.11) ipaddress (1.0.7) itsdangerous (0.23) jellyfish (0.5.6) Jinja2 (2.7.2) logilab-common (0.63.2) Loxodo (0.0.0) markdown2 (2.2.0) MarkupSafe (0.18) matplotlib (1.4.3) mechanize (0.2.5) mock (1.0.1) munkres (1.0.8) musicbrainzngs (0.6) mutagen (1.34.1) nose (1.3.7) numpy (1.9.2) oauth2 (1.5.211) oauth2client (1.4.11) oauthlib (1.0.3) pdfminer (20140328) pep8 (1.6.2) Pillow (2.7.0) pip (8.1.2) pluggy (0.3.1) poster (0.8.1) proboscis (1.2.6.0) protobuf (2.6.1) py (1.4.31) pyacoustid (1.0.0) pyasn1 (0.1.7) pyasn1-modules (0.0.5) pyCLI (2.0.3) pycparser (2.14) pycrypto (2.6.1) pydns (2.3.6) Pygments (2.1.3) pylast (0.5.11) pylint (1.4.3) pyparsing (2.0.3) pyradio (0.5.2) pysnmp (4.2.5) pyspf (2.0.10) pysphere (0.1.7) python-dateutil (2.4.2) python-itunes (1.0) python-mcrypt (1.1) python-rtkit (0.7.0) pytz (2015.4) pyvmomi (5.5.0.2014.1.1) pyxis (0.2.1) PyYAML (3.12) radio (0.0.6) radiopy (0.6) reportlab (3.1.44) requests (2.7.0) requests-oauthlib (0.4.0) requests-toolbelt (0.7.0) rsa (3.1.4) rt (1.0.8) scipy (0.16.0) seesaw (0.8) setuptools (18.7.1) six (1.10.0) slack-webhooks (1.0.6) snowballstemmer (1.2.1) sockjs-tornado (1.0.1) Sphinx (1.4.5) SQLAlchemy (0.9.3) thrift (0.9.1) tornado (4.0.2) tox (2.3.1) Unidecode (0.4.19) urllib3 (1.10.4) validictory (1.0.0) vboxapi (1.0) virtualenv (12.0.7) Werkzeug (0.9.4) whatlastgenre (0.1.28) wheel (0.24.0) xlrd (0.9.3) xmltodict (0.9.2)
The day and month fields usually run into this problem when the corresponding year is missing. That's because file formats don't typically support the former without the latter. But that doesn't seem to be the case here—there's an original_year.
Could you please share an affected file? It would be reakly useful to reproduce this locally.
Attached.
Even if it was the date thing, it wouldn't explain artist_sort.
Fun fact:
I removed all the id3 tags from the file, then tried writing the tags from beets. Same thing happened.
lemon:~ xarph$ beet ls -p id:22460
/Users/xarph/Music/beets/Inon Zur/Icewind Dale II/24 IWD2 Main Theme.mp3
lemon:~ xarph$ id3v2 -D '/Users/xarph/Music/beets/Inon Zur/Icewind Dale II/24 IWD2 Main Theme.mp3'
Stripping id3 tag in "/Users/xarph/Music/beets/Inon Zur/Icewind Dale II/24 IWD2 Main Theme.mp3"...id3v1 and v2 stripped.
lemon:~ xarph$ beet -vv write -f id:22460
user configuration: /Users/xarph/.config/beets/config.yaml
data directory: /Users/xarph/.config/beets
plugin paths: /Users/xarph/work/whatlastgenre/plugin/beets/beetsplug
Sending event: pluginload
inline: adding item field disc_and_track
library database: /Users/xarph/Music/beetslibrary.blb
library directory: /Users/xarph/Music/beets
Sending event: library_opened
: - - 00 - (0000)
month: 00 -> 08
disc: 00 -> 01
mb_trackid: -> 3750a0d9-8c18-4a26-b2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RlRhP0kfAFa83ww9GMMhfuQMq1DM2lVXiDnEyHkOlxCxcTiE6O8kY-xng1lNnhvuB1wQ_6KHgy5EflToG7I0-OHgd_lLeQMgt8Q_WKp8iPHA_MHPKJzpfwL9B--BdOHeGlgzleND-uubhI_Ajfw59xotkiCc_xSAhzoXeI64h-olaWQ8slDvlx8jiPo-SFMNDDBXmNyST8HeEh_YiPJwpz4tKOD_0l-OiPBxe9oOvhSBJ-NE-MfIWOUDQsnbhInIM_o-dV4HzR_AifHVeKHj_wwwd6oAeA44APEccBAIIBwYBzGAEHAIIUMUBQRoCwSiCBsEACCEgMMg4gJxADwBDzBFKAAMKAUIwjQ4Q3QgCEAGBMCAWkAkIILA0jBhFBhCEGU2AQIkIYTwkwQghgAFQAIS2cIYA5RoAFRBkgLBBAEEaeBIAAgAETQjlAqCKMAEIkAAAIAAEgSBMFgAHOEAaIAc4JQIQwRghCLAJMKGAMMIA5AABhABhEHFFKScGIcYAgQgA0ghggpLFACyUUFYZIRBhDQBhDACCICUSEEkIwAwgAkGhGIBRWAAGYEIoqAiQwiDHkgCNCMQOBAIAAIIwRSgKhgBIUIAIMIkQBiBgFAAlCEXIEMEGEIUIIIg0hRwklAXMMMAGAIgQYIYRlAgFEgQACGMAIQYYYAAQATihgAALCAGgEAAATggRjABEKiGTACQGIQEBA6BgAhiQCBgUtBA
rg_album_gain: 0.0 -> -2.0
mb_releasegroupid: -> b26d11ed-230f-33f5-839d-964fd0964755
rg_album_peak: 0.0 -> 1.0
albumartist_credit: -> Inon Zur
acoustid_id: -> 04b0b79f-3080-42dd-af70-763a9b993951
rg_track_gain: 0.0 -> -1.2
day: 00 -> 28
original_year: 0000 -> 2002
artist: -> Inon Zur
mb_albumartistid: -> ba23bac1-2b00-43fb-95e5-c3c0fd286e7e
artist_credit: -> Inon Zur
disctotal: 00 -> 01
albumstatus: -> Official
original_day: 00 -> 28
albumartist: -> Inon Zur
year: 0000 -> 2002
album: -> Icewind Dale II
mb_artistid: -> ba23bac1-2b00-43fb-95e5-c3c0fd286e7e
media: -> CD
artist_sort: -> Zur, Inon
tracktotal: 00 -> 40
rg_track_peak: 0.0 -> 0.8
catalognum: -> CD-W58-1336-3
original_month: 00 -> 08
track: 00 -> 24
initial_key: -> Dm
genre: -> Video Game Music, Electronic, Ambient
language: -> eng
country: -> US
script: -> Latn
label: -> Interplay Entertainment Corp.
albumtype: -> soundtrack
Sending event: write
Sending event: after_write
Sending event: database_change
Sending event: cli_exit
lemon:~ xarph$ beet -vv info id:22460
user configuration: /Users/xarph/.config/beets/config.yaml
data directory: /Users/xarph/.config/beets
plugin paths: /Users/xarph/work/whatlastgenre/plugin/beets/beetsplug
Sending event: pluginload
inline: adding item field disc_and_track
library database: /Users/xarph/Music/beetslibrary.blb
library directory: /Users/xarph/Music/beets
Sending event: library_opened
/Users/xarph/Music/beets/Inon Zur/Icewind Dale II/24 IWD2 Main Theme.mp3
acoustid_fingerprint: AQAB2xMVSUpy5EfDuMUlBmqTgz-F7sGlBeGTBHnxJB7KpYU_aHKL98FlQwifBT6FHj2Lj3B8Is98iNnAdsjUoz_Oo1wRKQyO-9AxRS1a7vjRZZEC8bxQD_FRXMPRCjEPbUJe4kdf9Jdwfkj5DsmqFI-Oa7jRB02l45HKCLnEFHKJ6EN_7FsMfxG8Hb7RKT_2Y7yOHg2zxfjx5HgaBf3SIdP8CdqDPPiIB7ZxCrmiZBKk6-hShFosHV801HvQvMOZifgRKUet7ESbZILnQw-UncObI81S44sRXRaxB-eCsxAfoj9-8Zi-4MpREn3gk6iOH8-HazOu1ziP54J-hI2Fv7gZuOhxH6-CPKwDhTqYPAgbHaWV0Gic4xGDI2tYqNpx5FNB5TNOHtm3FO3ROIvxMUpKNIqEUEf_BZ4WDpdipMyiYLqJq4d2CVPi4ySFZ0FzY_fhLjq0CrlRK3B9fA96YY0k9EsmIX0I3Ugro1d2vGh3wdsQHroY9JSE-EepYkdYBX5YKOrx5ajcocGXQntCXBfyNjiNj-h9_EH4KIW5CxMlBno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YYYAAQATihgAALCAGgEAAATggRjABEKiGTACQGIQEBA6BgAhiQCBgUtBA
acoustid_id: 04b0b79f-3080-42dd-af70-763a9b993951
album: Icewind Dale II
albumartist: Inon Zur
albumartist_credit: Inon Zur
albumartist_sort: Zur, Inon
albumstatus: Official
albumtype: soundtrack
art: False
artist: Inon Zur
artist_credit: Inon Zur
bitdepth: 0
bitrate: 192000
bpm: 0
catalognum: CD-W58-1336-3
channels: 2
comp: False
country: US
date: 2002-08-28
day: 28
disc: 1
disctotal: 1
format: MP3
genre: Video Game Music, Electronic, Ambient
genres: Video Game Music, Electronic, Ambient
initial_key: Dm
label: Interplay Entertainment Corp.
language: eng
length: 61.413875
lyrics:
mb_albumartistid: ba23bac1-2b00-43fb-95e5-c3c0fd286e7e
mb_albumid: dd25d4a9-9276-4f61-bb8a-e77daeb848dc
mb_artistid: ba23bac1-2b00-43fb-95e5-c3c0fd286e7e
mb_releasegroupid: b26d11ed-230f-33f5-839d-964fd0964755
mb_trackid: 3750a0d9-8c18-4a26-b2b9-3b69a5cef4d4
media: CD
month: 8
original_date: 2002-01-01
original_year: 2002
rg_album_gain: -2.0
rg_album_peak: 0.97319
rg_track_gain: -1.21
rg_track_peak: 0.803964
samplerate: 44100
script: Latn
title: IWD2 Main Theme
track: 24
tracktotal: 40
year: 2002
Sending event: cli_exit
In mediafile.py, original_day, original_year and original_month are encapsulated in TDOR, and artist_sort is TSOP. Neither of these appear in the kwargs passed to self.mgfile.save(**kwargs). Instead we get TORY for the original year (which writes correctly), and a TXXX field for ALBUMARTISTSORT which is not what artist_sort is looking for. This is before mutagen even gets involved, so it's definitely in beets somewhere. Those fields are just falling on the floor after the ui prints the changes and before the changes are passed into mediafile.
Incredibly obnoxious pdb output:
(Pdb) l 1444
1439 kwargs['v2_version'] = 3
1440
1441 # Isolate bugs in Mutagen.
1442 try:
1443 import pdb; pdb.set_trace()
1444 -> self.mgfile.save(**kwargs)
1445 except (IOError, OSError):
1446 # Propagate these through: they don't represent Mutagen bugs.
1447 raise
1448 except Exception as exc:
1449 log.debug(u'{}', traceback.format_exc())
(Pdb) pp id3
{u'USLT::XXX': USLT(encoding=<Encoding.UTF8: 3>, lang='XXX', desc=u'', text=u''), 'TMED': TMED(encoding=<Encoding.UTF8: 3>, text=[u'CD']), u'TXXX:MusicBrainz Album Comment': TXXX(encoding=<Encoding.UTF8: 3>, desc=u'MusicBrainz Album Comment', text=[u'']), u'TXXX:Acoustid Id': TXXX(encoding=<Encoding.UTF8: 3>, desc=u'Acoustid Id', text=[u'04b0b79f-3080-42dd-af70-763a9b993951']), u'TXXX:MusicBrainz Album Id': TXXX(encoding=<Encoding.UTF8: 3>, desc=u'MusicBrainz Album Id', text=[u'dd25d4a9-9276-4f61-bb8a-e77daeb848dc']), u'TXXX:Album Artist Credit': TXXX(encoding=<Encoding.UTF8: 3>, desc=u'Album Artist Credit', text=[u'Inon Zur']), u'TXXX:MusicBrainz Album Type': TXXX(encoding=<Encoding.UTF8: 3>, desc=u'MusicBrainz Album Type', text=[u'soundtrack']), u'TXXX:MusicBrainz Album Artist Id': TXXX(encoding=<Encoding.UTF8: 3>, desc=u'MusicBrainz Album Artist Id', text=[u'ba23bac1-2b00-43fb-95e5-c3c0fd286e7e']), u'TXXX:MusicBrainz Artist Id': TXXX(encoding=<Encoding.UTF8: 3>, desc=u'MusicBrainz Artist Id', text=[u'ba23bac1-2b00-43fb-95e5-c3c0fd286e7e']), u'TXXX:Script': TXXX(encoding=<Encoding.UTF8: 3>, desc=u'Script', text=[u'Latn']), 'TDAT': TDAT(encoding=<Encoding.UTF8: 3>, text=[u'2808']), u'TXXX:ASIN': TXXX(encoding=<Encoding.UTF8: 3>, desc=u'ASIN', text=[u'']), u'UFID:http://musicbrainz.org': UFID(owner=u'http://musicbrainz.org', data='3750a0d9-8c18-4a26-b2b9-3b69a5cef4d4'), 'TPE2': TPE2(encoding=<Encoding.UTF8: 3>, text=[u'Inon Zur']), u'TXXX:CATALOGNUMBER': TXXX(encoding=<Encoding.UTF8: 3>, desc=u'CATALOGNUMBER', text=[u'CD-W58-1336-3']), 'TALB': TALB(encoding=<Encoding.UTF8: 3>, text=[u'Icewind Dale II']), 'TLAN': TLAN(encoding=<Encoding.UTF8: 3>, text=[u'eng']), 'TORY': TORY(encoding=<Encoding.UTF8: 3>, text=[u'2002']), 'TKEY': TKEY(encoding=<Encoding.UTF8: 3>, text=[u'Dm']), u'COMM:iTunNORM:eng': COMM(encoding=<Encoding.UTF8: 3>, lang='eng', desc=u'iTunNORM', text=[u' 00000529 00000529 00000CE7 00000CE7 00000000 00000000 000066E8 000066E8 00000000 00000000']), 'TCMP': TCMP(encoding=<Encoding.UTF8: 3>, text=[u'0']), u'TXXX:Acoustid Fingerprint': TXXX(encoding=<Encoding.UTF8: 3>, desc=u'Acoustid Fingerprint', text=[u'AQAB2xMVSUpy5EfDuMUlBmqTgz-F7sGlBeGTBHnxJB7KpYU_aHKL98FlQwifBT6FHj2Lj3B8Is98iNnAdsjUoz_Oo1wRKQyO-9AxRS1a7vjRZZEC8bxQD_FRXMPRCjEPbUJe4kdf9Jdwfkj5DsmqFI-Oa7jRB02l45HKCLnEFHKJ6EN_7FsMfxG8Hb7RKT_2Y7yOHg2zxfjx5HgaBf3SIdP8CdqDPPiIB7ZxCrmiZBKk6-hShFosHV801HvQvMOZifgRKUet7ESbZILnQw-UncObI81S44sRXRaxB-eCsxAfoj9-8Zi-4MpREn3gk6iOH8-HazOu1ziP54J-hI2Fv7gZuOhxH6-CPKwDhTqYPAgbHaWV0Gic4xGDI2tYqNpx5FNB5TNOHtm3FO3ROIvxMUpKNIqEUEf_BZ4WDpdipMyiYLqJq4d2CVPi4ySFZ0FzY_fhLjq0CrlRK3B9fA96YY0k9EsmIX0I3Ugro1d2vGh3wdsQHroY9JSE-EepYkdYBX5YKOrx5ajcocGXQntCXBfyNjiNj-h9_EH4KIW5CxMlBnoy1Gj2htDOpHBGxULYJLjEoxf8Iyf6QyeDR9ER_nCPyscjI99PfIK-ot4O_x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X:Artist Credit': TXXX(encoding=<Encoding.UTF8: 3>, desc=u'Artist Credit', text=[u'Inon Zur']), u'TXXX:ALBUMARTISTSORT': TXXX(encoding=<Encoding.UTF8: 3>, desc=u'ALBUMARTISTSORT', text=[u'Zur, Inon']), u'TXXX:MusicBrainz Release Group Id': TXXX(encoding=<Encoding.UTF8: 3>, desc=u'MusicBrainz Release Group Id', text=[u'b26d11ed-230f-33f5-839d-964fd0964755']), 'TRCK': TRCK(encoding=<Encoding.UTF8: 3>, text=[u'24/40']), 'TIT2': TIT2(encoding=<Encoding.UTF8: 3>, text=[u'IWD2 Main Theme']), 'TCON': TCON(encoding=<Encoding.UTF8: 3>, text=[u'Video Game Music, Electronic, Ambient']), u'COMM::XXX': COMM(encoding=<Encoding.UTF8: 3>, lang='XXX', desc=u'', text=[u'']), 'TCOM': TCOM(encoding=<Encoding.UTF8: 3>, text=[u'']), u'TXXX:REPLAYGAIN_ALBUM_PEAK': TXXX(encoding=<Encoding.UTF8: 3>, desc=u'REPLAYGAIN_ALBUM_PEAK', text=[u'0.973190']), 'TPE1': TPE1(encoding=<Encoding.UTF8: 3>, text=[u'Inon Zur']), 'TENC': TENC(encoding=<Encoding.UTF8: 3>, text=[u'']), u'TXXX:REPLAYGAIN_TRACK_PEAK': TXXX(encoding=<Encoding.UTF8: 3>, desc=u'REPLAYGAIN_TRACK_PEAK', text=[u'0.803964']), 'TYER': TYER(encoding=<Encoding.UTF8: 3>, text=[u'2002']), u'TXXX:REPLAYGAIN_TRACK_GAIN': TXXX(encoding=<Encoding.UTF8: 3>, desc=u'REPLAYGAIN_TRACK_GAIN', text=[u'-1.21 dB']), 'TPUB': TPUB(encoding=<Encoding.UTF8: 3>, text=[u'Interplay Entertainment Corp.']), 'TPOS': TPOS(encoding=<Encoding.UTF8: 3>, text=[u'1/1']), 'TBPM': TBPM(encoding=<Encoding.UTF8: 3>, text=[u'0']), 'TIT1': TIT1(encoding=<Encoding.UTF8: 3>, text=[u'']), u'TXXX:REPLAYGAIN_ALBUM_GAIN': TXXX(encoding=<Encoding.UTF8: 3>, desc=u'REPLAYGAIN_ALBUM_GAIN', text=[u'-2.00 dB']), u'TXXX:MusicBrainz Album Release Country': TXXX(encoding=<Encoding.UTF8: 3>, desc=u'MusicBrainz Album Release Country', text=[u'US']), u'TXXX:MusicBrainz Album Status': TXXX(encoding=<Encoding.UTF8: 3>, desc=u'MusicBrainz Album Status', text=[u'Official'])}
Found the culprit! id3.update_to_v23 in mutagen just outright deletes TSOP and TDOR because they're id3v2.4 tags, not in id3v2.3 tags.
I propose either forcing everything to id3v2.4, or detecting if beets is running in id3v2.3 mode and migrate those fields to TXXX fields.
Switching id3v23 off fixed it. I don't remember why I had it turned on, but this saga means that something should give if a tag not valid in id3v23 has a write attempt. Probably should case TSOP and TDOR into TXXX in mediafile.py if id3v23 is true.
Now I'm having the same problem with rg_album_gain; just shoot me now.
Edit: this one is only affecting AAC files.
(Sorry for the delay!) This makes sense; those fields aren't in ID3v2.3. If we can find a standard way to store them for that version, maybe we can sort out a fallback. That can happen in a separate issue.
Problem
I noticed when I was doing some tidiness that certain tracks were appearing in beet write over and over again. I isolated a problem file, verified the permissions were fine (0644, nothing weird), and did some checks
Running this command in verbose (
-vv
) mode:Led to this problem:
Here's a link to the music files that trigger the bug (if relevant): I'll post on request, but as it affects large swathes of my library at the moment, it's safe to say it's not file-related.
Setup
Python 2.7.11 (default, Dec 29 2015, 10:20:38) [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
My configuration (output of
beet config
) is: