albertz / music-player

Music player - endlessly plays your music
http://albertz.github.io/music-player/
BSD 2-Clause "Simplified" License
490 stars 58 forks source link

song skipping / input output error [Errno 5] #41

Open christophmluscher opened 11 years ago

christophmluscher commented 11 years ago

song skipping. song starts after a few seconds skips to next song.

new song: The Red Hot Chili Peppers - Purple Stain, 04:17, mp3, 125 kbit/s, 3.93 MB
new song: Kings of Leon - Notion, 03:03, mp3, 314 kbit/s, 7.01 MB
(01 Ball Peen Hammer.mp3) avcodec_decode_audio4 error at pos 0
(01 Ball Peen Hammer.mp3) avcodec_decode_audio4 error at pos 0
(01 Ball Peen Hammer.mp3) avcodec_decode_audio4 error at pos 0
EXCEPTION
Traceback (most recent call last):
  File "/Applications/MusicPlayer.app/Contents/Resources/Python/Song.py", line 96, in readPacket
    line: s = self.f.read(bufSize)
    locals:
      s = <not found>
      self = <local> Song(url=u'/Users/schweizer/Music/iTunes/iTunes Media/Music/Kings of Leon/Only By The Night/1-08 Notion.mp3', id='pL\xb0\xa9\xe7\xc6\xaa\x15\xcf\x00O\xcb\x06\xa7\x1d*\xfd\xef\x08\x05\xfd')
      self.f = <local> <open file u'/Users/schweizer/Music/iTunes/iTunes Media/Music/Kings of Leon/Only By The Night/1-08 Notion.mp3', mode 'r' at 0x10a7590c0>
      self.f.read = <local> <built-in method read of file object at 0x10a7590c0>
      bufSize = <local> 802
IOError: [Errno 5] Input/output error
new song: The Black Crowes - Greasy Grass River, 03:20, m4a, 127 kbit/s, 3.1 MB
EXCEPTION
Traceback (most recent call last):
  File "/Applications/MusicPlayer.app/Contents/Resources/Python/Song.py", line 96, in readPacket
    line: s = self.f.read(bufSize)
    locals:
      s = <not found>
      self = <local> Song(url=u'/Users/schweizer/Music/iTunes/iTunes Media/Music/The Black Crowes/Lions/07 Greasy Grass River.m4a', id='p\xf3@"\x0f\x03\xe8"\x17`M\x96/\xb2\x81}Ez\xf5\xa3\xba')
      self.f = <local> <open file u'/Users/schweizer/Music/iTunes/iTunes Media/Music/The Black Crowes/Lions/07 Greasy Grass River.m4a', mode 'r' at 0x1089666f0>
      self.f.read = <local> <built-in method read of file object at 0x1089666f0>
      bufSize = <local> 2080
IOError: [Errno 5] Input/output error
new song: Queens Of The Stone Age - A Song For The Deaf, 06:42, mp3, 125 kbit/s, 6.14 MB
EXCEPTION
Traceback (most recent call last):
  File "/Applications/MusicPlayer.app/Contents/Resources/Python/Song.py", line 96, in readPacket
    line: s = self.f.read(bufSize)
    locals:
      s = <not found>
      self = <local> Song(url=u'/Users/schweizer/Music/iTunes/iTunes Media/Music/Queens Of The Stone Age/Songs For The Deaf [Europe]/13 A Song For The Deaf.mp3', id='p\x06\xca~\xc4\xbar\xe0\xcc\xaf\x93)\x98V\xa1\xcbp\xd3\xad\x8f\xe4')
      self.f = <local> <open file u'/Users/schweizer/Music/iTunes/iTunes Media/Music/Queens Of The Stone Age/Songs For The Deaf [Europe]/13 A Song For The Deaf.mp3', mode 'r' at 0x108966e40>
      self.f.read = <local> <built-in method read of file object at 0x108966e40>
      bufSize = <local> 4096
IOError: [Errno 5] Input/output error
new song: Led Zeppelin - Boogie With Stu, 03:53, mp3, 212 kbit/s, 6.04 MB
EXCEPTION
Traceback (most recent call last):
  File "/Applications/MusicPlayer.app/Contents/Resources/Python/Song.py", line 96, in readPacket
    line: s = self.f.read(bufSize)
    locals:
      s = <not found>
      self = <local> Song(url=u'/Users/schweizer/Music/iTunes/iTunes Media/Music/Led Zeppelin/Physical Graffiti/2-07 Boogie With Stu.mp3', id='p\xf6\xb6\xb01U^d\x87v\xa2\x08\xc1\x9f\xe7i\x93\xc27t\x19')
      self.f = <local> <open file u'/Users/schweizer/Music/iTunes/iTunes Media/Music/Led Zeppelin/Physical Graffiti/2-07 Boogie With Stu.mp3', mode 'r' at 0x10a759d20>
      self.f.read = <local> <built-in method read of file object at 0x10a759d20>
      bufSize = <local> 4096
IOError: [Errno 5] Input/output error
new song: Eric Clapton - Lay Down Sally, 03:51, mp3, 250 kbit/s, 7.05 MB
albertz commented 11 years ago

Hm, Input/Output error, that is some hardware error which means that there are hardware problems with your disk, or the OS is at least reporting this error for some reason.

Are you sure that your disk is Ok?

I could add some error resistance, such that when some reading error (IO error) occurs, it tries to reopen the file and read again. Actually, for network access, where this can happen, I was planning to add that. That is also probably the reason why Amarok skips sometimes songs when it plays them from a Samba share.