Tauon icon indicating copy to clipboard operation
Tauon copied to clipboard

Exception in thread - Null bytes in flac

Open awsms opened this issue 4 years ago • 3 comments

Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/home/ash/Appz/TauonMusicBox/t_modules/t_main.py", line 4721, in notify_update_fire
    self.mpris.update()
  File "/home/ash/Appz/TauonMusicBox/t_modules/t_dbus.py", line 448, in update
    self.PropertiesChanged('org.mpris.MediaPlayer2.Player', changed, [])
  File "/home/ash/.local/lib/python3.8/site-packages/dbus/decorators.py", line 325, in emit_signal
    message.append(signature=signature, *args)
ValueError: embedded null byte

Having this error when launching Tauon. I can play a song by double-clicking, then tauon immediatly freezes (the track is played untill the end).

awsms avatar Oct 27 '21 21:10 awsms

Could be that a null byte was picked up from a files tags. Will want to look into that.

Ive made a commit that will print the name of the track its failing on... (I assume its just one track causing the issue? or maybe one album?) So, you can run from git master and try replicate it. Hopefully we can narrow it down to the specific file.

Edit: oh i guess you would already know if is just one file

Taiko2k avatar Oct 27 '21 21:10 Taiko2k

nice work that was quick!

{'Metadata': dbus.Dictionary({'mpris:trackid': dbus.ObjectPath('/com/tauon/70945/9675'), 'mpris:length': dbus.Int64(0), 'xesam:album': 'Pep Talk\x00', 'xesam:albumArtist': dbus.Array([''], signature=None), 'xesam:artist': dbus.Array(['国生さゆり\x00'], signature=None), 'xesam:title': '“I Love You!”を翼にして\x00', 'xesam:asText': '', 'xesam:autoRating': 0.3, 'xesam:composer': dbus.Array([''], signature=None), 'tauon:loved': False, 'xesam:comment': dbus.Array([''], signature=None), 'xesam:genre': dbus.Array(['J-pop\x00'], signature=None), 'xesam:url': 'file:///mnt/data/downloads/Music/Asian.Stuff/Japanese/Idols/Sayuri_Kokusho/Albums/Kokusho%20Sayuri%20%28%E5%9B%BD%E7%94%9F%E3%81%95%E3%82%86%E3%82%8A%29%20-1986.07.16-%20Pep%20Talk%20%7B32DH-462%7D%20%5BCD-FLAC%5D/01.%20%E2%80%9CI%20Love%20You%E2%80%9D%E3%82%92%E7%BF%BC%E3%81%AB%E3%81%97%E3%81%A6.flac', 'mpris:artUrl': 'file:///home/ash/Appz/TauonMusicBox/cache/export/d1c43566822c62dfd2e93d792861d2db.jpg'}, signature=dbus.Signature('sv'))}
/mnt/data/downloads/Music/Asian.Stuff/Japanese/Idols/Sayuri_Kokusho/Albums/Kokusho Sayuri (国生さゆり) -1986.07.16- Pep Talk {32DH-462} [CD-FLAC]/01. “I Love You”を翼
にして.flac

i can send you the album on discord if you want to do some testing on your side

awsms avatar Oct 27 '21 21:10 awsms

So it's just that one album right? Seems like every tag has a null byte in it. I assume this is because of bad tags.

I guess the solution would be to just filter those bytes out when scanning the tag, even though it's not correct that those should be there. Or maybe it's better to abort the metadata read and force the user to retag their files.

Taiko2k avatar Oct 27 '21 22:10 Taiko2k