schollz / musicsaur

Music synchronization from your browser.
https://radio.schollz.com/
MIT License
281 stars 17 forks source link

Error in Windows 8.1 with Python 3.4.4rc1.amd64 #8

Closed primalthrak closed 8 years ago

primalthrak commented 8 years ago

Here is the error I am getting. I am including all command output. C:\Users\home\Documents\Sync Music>c:\python34\python.exe syncmusic.py "F:\Media\Music" 2015-12-18 13:24:40,445 - eyed3.core - DEBUG - Loading file: F:\Media\Music\3OH!3 - Want\01 - 3OH!3 - Tapp.mp3 2015-12-18 13:24:40,450 - eyed3.core - DEBUG - File mime-type: audio/mpeg 2015-12-18 13:24:40,455 - eyed3.mp3 - DEBUG - mp3 header search starting @ 0 2015-12-18 13:24:40,457 - eyed3.mp3.headers - DEBUG - MPEG audio version: 1.0 2015-12-18 13:24:40,459 - eyed3.mp3.headers - DEBUG - MPEG audio layer: III 2015-12-18 13:24:40,461 - eyed3.mp3.headers - DEBUG - MPEG sampling frequency: 44100 2015-12-18 13:24:40,465 - eyed3.mp3.headers - DEBUG - MPEG bit rate: 128 2015-12-18 13:24:40,467 - eyed3.mp3.headers - DEBUG - MPEG channel mode: Joint stereo 2015-12-18 13:24:40,471 - eyed3.mp3.headers - DEBUG - MPEG channel mode extension: 2 2015-12-18 13:24:40,475 - eyed3.mp3.headers - DEBUG - MPEG CRC error protection: False 2015-12-18 13:24:40,479 - eyed3.mp3.headers - DEBUG - MPEG original: 1 2015-12-18 13:24:40,481 - eyed3.mp3.headers - DEBUG - MPEG copyright: 0 2015-12-18 13:24:40,483 - eyed3.mp3.headers - DEBUG - MPEG private bit: 0 2015-12-18 13:24:40,484 - eyed3.mp3.headers - DEBUG - MPEG padding: 0 2015-12-18 13:24:40,486 - eyed3.mp3.headers - DEBUG - MPEG emphasis: None 2015-12-18 13:24:40,487 - eyed3.mp3.headers - DEBUG - MPEG frame length: 417 2015-12-18 13:24:40,488 - eyed3.mp3 - DEBUG - mp3 header fffb9064 found at position: 0x1100 Traceback (most recent call last): File "syncmusic.py", line 237, in audiofile = eyed3.load(playlist[-1]) File "c:\python34\lib\site-packages\eyed3-0.7.9-py3.4.egg\eyed3\core.py", line 89, in load return mp3.Mp3AudioFile(path, tag_version) File "c:\python34\lib\site-packages\eyed3-0.7.9-py3.4.egg\eyed3\mp3init.py", line 168, in init core.AudioFile.init(self, path) File "c:\python34\lib\site-packages\eyed3-0.7.9-py3.4.egg\eyed3\core.py", line 244, in init self._read() File "c:\python34\lib\site-packages\eyed3-0.7.9-py3.4.egg\eyed3\mp3init.py", line 186, in _read self._info = Mp3AudioInfo(file_obj, mp3_offset, self._tag) File "c:\python34\lib\site-packages\eyed3-0.7.9-py3.4.egg\eyed3\mp3init.py", line 98, in init if not self.xing_header.decode(mp3_frame): File "c:\python34\lib\site-packages\eyed3-0.7.9-py3.4.egg\eyed3\mp3\headers.py", line 311, in decode version = (ord(frame[1]) >> 3) & 0x1 TypeError: ord() expected string of length 1, but int found

schollz commented 8 years ago

Thanks! So this error is a problem with eyed3 loading the ID3 info from your particular MP3 file.

I will fix this by including the eyed3 in the try/catch. If you want to edit yourself, the change will be

237                audiofile = eyed3.load(playlist[-1])
238                try:
239                    title = audiofile.tag.title

TO

237                try:
238                    audiofile = eyed3.load(playlist[-1])
239                    title = audiofile.tag.title

I will commit this to the repo later today!