Closed
Description
I have a WAV file in which I already added a few dummy tags using foobar2000
Trying to add tags using mutagen now I'm having difficulty
>>> wlist = glob('*.wav')
>>> w = wlist[0]
>>> WAVE(w)
{'TIT2': TIT2(encoding=<Encoding.UTF16: 1>, text=['Little By Little (Waste Wisely Edit)']), 'TPE1': TPE1(encoding=<Encoding.UTF16: 1>, text=['The Marias']), 'TXXX:initialkey': TXXX(encoding=<Encoding.UTF16: 1>, desc='initialkey', text=['HI'])}
>>> WAVE(w).tags.add(TKEY(encoding=3, text=['Abm']))
>>> WAVE(w).save()
>>> WAVE(w)
{'TIT2': TIT2(encoding=<Encoding.UTF16: 1>, text=['Little By Little (Waste Wisely Edit)']), 'TPE1': TPE1(encoding=<Encoding.UTF16: 1>, text=['The Marias']), 'TXXX:initialkey': TXXX(encoding=<Encoding.UTF16: 1>, desc='initialkey', text=['HI'])}
I tried another technique which seemed to be suggested in #392 where I deleted all the tags, and then try to add new ones using only mutagen, but I get an error
>>> mutagen.wave.delete(w)
>>> WAVE(w)
{}
>>> WAVE(w).add_tags()
>>> WAVE(w).tags.add(TKEY(encoding=3, text=['Abm']))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'add'
Any assistance would be much appreciated!