on my first attempt with sonospy. Getting there slowly. Still trying to index my collection. Sadly although the main indexing is completed finally (after some processing hiccups caused by strange characters on some of the MP3 tags) the scan script now appears to be trying to process all the playlist files in my music folder. It appears many of these are corrupt or broken. Is there any way to stop the scan script bothering with all the M3U files? I guess I could just remove them all but that would be a last resort.
Any advice appreciated. Hopefully if I can get the scan to complete sucessfully I will actually be able to browse my library fully for the first time in years... thanks
Adam..
<type 'exceptions.UnicodeDecodeError'>
Python 2.6.6: C:\Python26\python.exe
Sun Jan 01 19:55:21 2017
A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.
C:\Users\adam\Desktop\Sonospy\sonospy\gettags.py in <module>()
2937
2938 if __name__ == "__main__":
2939 status = main()
2940 sys.exit(status)
2941
status undefined
main = <function main>
C:\Users\adam\Desktop\Sonospy\sonospy\gettags.py in main(argv=None)
2932 for path in args:
2933 if path.endswith(os.sep): path = path[:-1]
2934 process_dir(path.decode(enc), options, database)
2935 filelog.close_log_files()
2936 return 0
global process_dir = <function process_dir>
path = r'\\192.168.0.14\music'
path.decode = <built-in method decode of str object>
global enc = 'mbcs'
options = <Values at 0x265d188: {'verbose': False, 'databa...quiet': False, 'exclude': None, 'extract': None}>
database = r'C:\Users\adam\Desktop\Sonospy\sonospy\test.db'
C:\Users\adam\Desktop\Sonospy\sonospy\gettags.py in process_dir(scanpath=u'\\\\192.168.0.14\\music', options=<Values at 0x265d188: {'verbose': False, 'databa...quiet': False, 'exclude': None, 'extract': None}>, database=r'C:\Users\adam\Desktop\Sonospy\sonospy\test.db')
1670
1671 # read playlist date and track details
1672 playlisttracks = read_playlistfile(ffn, filepath)
1673
1674 # check what has changed
playlisttracks = [(u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...s-different_light_(special_edition)-2cd-2010.m3u', u'1392228706.34', u'1291743375.0', u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...tion)-2CD-2010-WRE\\101-bangles-manic_monday.mp3', u'1392228707.8', u'1291743766.0', 1, 0), (u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...s-different_light_(special_edition)-2cd-2010.m3u', u'1392228706.34', u'1291743375.0', u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...D-2010-WRE\\102-bangles-in_a_different_light.mp3', u'1392228708.58', u'1291743886.0', 2, 0), (u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...s-different_light_(special_edition)-2cd-2010.m3u', u'1392228706.34', u'1291743375.0', u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...10-WRE\\103-bangles-walking_down_your_street.mp3', u'1392228712.71', u'1291743750.0', 3, 0), (u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...s-different_light_(special_edition)-2cd-2010.m3u', u'1392228706.34', u'1291743375.0', u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...-2010-WRE\\104-bangles-walk_like_an_egyptian.mp3', u'1392228704.8', u'1291743762.0', 4, 0), (u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...s-different_light_(special_edition)-2cd-2010.m3u', u'1392228706.34', u'1291743375.0', u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...010-WRE\\105-bangles-standing_in_the_hallway.mp3', u'1392228710.69', u'1291743768.0', 5, 0), (u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...s-different_light_(special_edition)-2cd-2010.m3u', u'1392228706.34', u'1291743375.0', u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...ition)-2CD-2010-WRE\\106-bangles-return_post.mp3', u'1392228707.01', u'1291743762.0', 6, 0), (u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...s-different_light_(special_edition)-2cd-2010.m3u', u'1392228706.34', u'1291743375.0', u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...-WRE\\107-bangles-if_she_knew_what_she_wants.mp3', u'1392228708.27', u'1291743758.0', 7, 0), (u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...s-different_light_(special_edition)-2cd-2010.m3u', u'1392228706.34', u'1291743375.0', u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...Edition)-2CD-2010-WRE\\108-bangles-let_it_go.mp3', u'1392228709.95', u'1291743812.0', 8, 0), (u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...s-different_light_(special_edition)-2cd-2010.m3u', u'1392228706.34', u'1291743375.0', u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...n)-2CD-2010-WRE\\109-bangles-september_gurls.mp3', u'1392228705.67', u'1291743751.0', 9, 0), (u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...s-different_light_(special_edition)-2cd-2010.m3u', u'1392228706.34', u'1291743375.0', u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...10-WRE\\110-bangles-angels_dont_fall_in_love.mp3', u'1392228707.39', u'1291743745.0', 10, 0), (u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...s-different_light_(special_edition)-2cd-2010.m3u', u'1392228706.34', u'1291743375.0', u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...Edition)-2CD-2010-WRE\\111-bangles-following.mp3', u'1392228708.01', u'1291743742.0', 11, 0), (u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...s-different_light_(special_edition)-2cd-2010.m3u', u'1392228706.34', u'1291743375.0', u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...tion)-2CD-2010-WRE\\112-bangles-not_like_you.mp3', u'1392228711.9', u'1291743867.0', 12, 0), (u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...s-different_light_(special_edition)-2cd-2010.m3u', u'1392228706.34', u'1291743375.0', u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...010-WRE\\201-bangles-manic_monday_(extended).mp3', u'1392228706.01', u'1291744113.0', 13, 0), (u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...s-different_light_(special_edition)-2cd-2010.m3u', u'1392228706.34', u'1291743375.0', u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...0-WRE\\202-bangles-hero_takes_a_fall_(remix).mp3', u'1392228712.93', u'1291744115.0', 14, 0), (u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...s-different_light_(special_edition)-2cd-2010.m3u', u'1392228706.34', u'1291743375.0', u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...lking_down_your_street_-_james_(live_medley).mp3', u'1392228705.19', u'1291744078.0', 15, 0), (u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...s-different_light_(special_edition)-2cd-2010.m3u', u'1392228706.34', u'1291743375.0', u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...-bangles-walk_like_an_egyptian_(dub_version).mp3', u'1392228706.39', u'1291744070.0', 16, 0), (u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...s-different_light_(special_edition)-2cd-2010.m3u', u'1392228706.34', u'1291743375.0', u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...205-bangles-walking_down_your_street_(remix).mp3', u'1392228710.42', u'1291744119.0', 17, 0), (u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...s-different_light_(special_edition)-2cd-2010.m3u', u'1392228706.34', u'1291743375.0', u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...-if_she_knew_what_she_wants_(extended_remix).mp3', u'1392228712.23', u'1291744111.0', 18, 0), (u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...s-different_light_(special_edition)-2cd-2010.m3u', u'1392228706.34', u'1291743375.0', u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...es-walk_like_an_egyptian_(accapella_version).mp3', u'1392228710.21', u'1291744092.0', 19, 0), (u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...s-different_light_(special_edition)-2cd-2010.m3u', u'1392228706.34', u'1291743375.0', u'\\\\192.168.0.14\\music\\Bangles-Different_Lig...2010-WRE\\208-bangles-bangles_hit_medley_mix.mp3', u'1392228710.96', u'1291744122.0', 20, 0)]
global read_playlistfile = <function read_playlistfile>
ffn = u"\\\\192.168.0.14\\music\\Beyonce - Discography...ov+2CD][MJN]\\CD1\\00. Beyonce - B'Day (CD1).m3u"
filepath = u"\\\\192.168.0.14\\music\\Beyonce - Discography...- B'Day (Deluxe) 2CDRip 2007 [Cov+2CD][MJN]\\CD1"
C:\Users\adam\Desktop\Sonospy\sonospy\gettags.py in read_playlistfile(filespec=u"\\\\192.168.0.14\\music\\Beyonce - Discography...ov+2CD][MJN]\\CD1\\00. Beyonce - B'Day (CD1).m3u", filepath=u"\\\\192.168.0.14\\music\\Beyonce - Discography...- B'Day (Deluxe) 2CDRip 2007 [Cov+2CD][MJN]\\CD1")
2418 trackcounts = defaultdict(int)
2419 pltrack = 1
2420 for trackcountdata, trackdata in process_workvirtualfile_file(filespec, filepath, 'playlist'):
2421 # print "============="
2422 # print trackdata
trackcountdata undefined
trackdata undefined
global process_workvirtualfile_file = <function process_workvirtualfile_file>
filespec = u"\\\\192.168.0.14\\music\\Beyonce - Discography...ov+2CD][MJN]\\CD1\\00. Beyonce - B'Day (CD1).m3u"
filepath = u"\\\\192.168.0.14\\music\\Beyonce - Discography...- B'Day (Deluxe) 2CDRip 2007 [Cov+2CD][MJN]\\CD1"
C:\Users\adam\Desktop\Sonospy\sonospy\gettags.py in process_workvirtualfile_file(filespec=u"\\\\192.168.0.14\\music\\Beyonce - Discography...ov+2CD][MJN]\\CD1\\00. Beyonce - B'Day (CD1).m3u", wvfilepath=u"\\\\192.168.0.14\\music\\Beyonce - Discography...- B'Day (Deluxe) 2CDRip 2007 [Cov+2CD][MJN]\\CD1", wvtype='playlist')
2484 yield None, None
2485 return
2486 pltracks = read_playlist(filespec, ex)
2487 for pltrack in pltracks:
2488 pltrack = checkpath(pltrack, wvfilepath)
pltracks undefined
global read_playlist = <function read_playlist>
filespec = u"\\\\192.168.0.14\\music\\Beyonce - Discography...ov+2CD][MJN]\\CD1\\00. Beyonce - B'Day (CD1).m3u"
ex = u'.m3u'
C:\Users\adam\Desktop\Sonospy\sonospy\gettags.py in read_playlist(filespec=u"\\\\192.168.0.14\\music\\Beyonce - Discography...ov+2CD][MJN]\\CD1\\00. Beyonce - B'Day (CD1).m3u", extension=u'.m3u')
2520 def read_playlist(filespec, extension):
2521 if extension in m3u_playlist_extensions:
2522 return read_m3u_playlist(filespec)
2523 if extension in pls_playlist_extensions:
2524 return read_pls_playlist(filespec)
global read_m3u_playlist = <function read_m3u_playlist>
filespec = u"\\\\192.168.0.14\\music\\Beyonce - Discography...ov+2CD][MJN]\\CD1\\00. Beyonce - B'Day (CD1).m3u"
C:\Users\adam\Desktop\Sonospy\sonospy\gettags.py in read_m3u_playlist(filespec=u'09 - Get Me Bodied (Extended Mix).mp3')
2528 def read_m3u_playlist(filespec):
2529 tracks = []
2530 for line in codecs.open(filespec,'r','utf-8'):
2531 if line == '': continue
2532 if line.startswith('#'): continue
line = u'09 - Get Me Bodied (Extended Mix).mp3\r\n'
global codecs = <module 'codecs' from 'C:\Python26\lib\codecs.pyc'>
codecs.open = <function open>
filespec = u'09 - Get Me Bodied (Extended Mix).mp3'
C:\Python26\lib\codecs.py in next(self=<open file u'\\\\192.168.0.14\\music\\Beyonce - ...\\CD1\\00. Beyonce - B'Day (CD1).m3u', mode 'rb'>)
682
683 """ Return the next decoded line from the input stream."""
684 return self.reader.next()
685
686 def __iter__(self):
self = <open file u'\\\\192.168.0.14\\music\\Beyonce - ...\\CD1\\00. Beyonce - B'Day (CD1).m3u', mode 'rb'>
self.reader = <open file u'\\\\192.168.0.14\\music\\Beyonce - ...\\CD1\\00. Beyonce - B'Day (CD1).m3u', mode 'rb'>
self.reader.next = <bound method StreamReader.next of <open file u'...\CD1\\00. Beyonce - B'Day (CD1).m3u', mode 'rb'>>
C:\Python26\lib\codecs.py in next(self=<open file u'\\\\192.168.0.14\\music\\Beyonce - ...\\CD1\\00. Beyonce - B'Day (CD1).m3u', mode 'rb'>)
613
614 """ Return the next decoded line from the input stream."""
615 line = self.readline()
616 if line:
617 return line
line undefined
self = <open file u'\\\\192.168.0.14\\music\\Beyonce - ...\\CD1\\00. Beyonce - B'Day (CD1).m3u', mode 'rb'>
self.readline = <bound method StreamReader.readline of <open fil...\CD1\\00. Beyonce - B'Day (CD1).m3u', mode 'rb'>>
C:\Python26\lib\codecs.py in readline(self=<open file u'\\\\192.168.0.14\\music\\Beyonce - ...\\CD1\\00. Beyonce - B'Day (CD1).m3u', mode 'rb'>, size=None, keepends=True)
528 # If size is given, we call read() only once
529 while True:
530 data = self.read(readsize, firstline=True)
531 if data:
532 # If we're at a "\r" read one extra character (which might
data undefined
self = <open file u'\\\\192.168.0.14\\music\\Beyonce - ...\\CD1\\00. Beyonce - B'Day (CD1).m3u', mode 'rb'>
self.read = <bound method StreamReader.read of <open file u'...\CD1\\00. Beyonce - B'Day (CD1).m3u', mode 'rb'>>
readsize = 72
firstline undefined
builtinTrue = True
C:\Python26\lib\codecs.py in read(self=<open file u'\\\\192.168.0.14\\music\\Beyonce - ...\\CD1\\00. Beyonce - B'Day (CD1).m3u', mode 'rb'>, size=72, chars=-1, firstline=True)
475 data = self.bytebuffer + newdata
476 try:
477 newchars, decodedbytes = self.decode(data, self.errors)
478 except UnicodeDecodeError, exc:
479 if firstline:
newchars = u''
decodedbytes = 0
self = <open file u'\\\\192.168.0.14\\music\\Beyonce - ...\\CD1\\00. Beyonce - B'Day (CD1).m3u', mode 'rb'>
self.decode = <built-in function utf_8_decode>
data = '\x82j\x85 Vu (feat. Jay-Z).mp3\r\n13 - Ring The Alarm.mp...ment.mp3\r\n15 - Listen (from the motion picture Dr'
self.errors = 'strict'
<type 'exceptions.UnicodeDecodeError'>: 'utf8' codec can't decode byte 0x82 in position 0: invalid start byte
__class__ = <type 'exceptions.UnicodeDecodeError'>
__delattr__ = <method-wrapper '__delattr__' of exceptions.UnicodeDecodeError object>
__dict__ = {}
__doc__ = 'Unicode decoding error.'
__format__ = <built-in method __format__ of exceptions.UnicodeDecodeError object>
__getattribute__ = <method-wrapper '__getattribute__' of exceptions.UnicodeDecodeError object>
__getitem__ = <method-wrapper '__getitem__' of exceptions.UnicodeDecodeError object>
__getslice__ = <method-wrapper '__getslice__' of exceptions.UnicodeDecodeError object>
__hash__ = <method-wrapper '__hash__' of exceptions.UnicodeDecodeError object>
__init__ = <method-wrapper '__init__' of exceptions.UnicodeDecodeError object>
__new__ = <built-in method __new__ of type object>
__reduce__ = <built-in method __reduce__ of exceptions.UnicodeDecodeError object>
__reduce_ex__ = <built-in method __reduce_ex__ of exceptions.UnicodeDecodeError object>
__repr__ = <method-wrapper '__repr__' of exceptions.UnicodeDecodeError object>
__setattr__ = <method-wrapper '__setattr__' of exceptions.UnicodeDecodeError object>
__setstate__ = <built-in method __setstate__ of exceptions.UnicodeDecodeError object>
__sizeof__ = <built-in method __sizeof__ of exceptions.UnicodeDecodeError object>
__str__ = <method-wrapper '__str__' of exceptions.UnicodeDecodeError object>
__subclasshook__ = <built-in method __subclasshook__ of type object>
__unicode__ = <built-in method __unicode__ of exceptions.UnicodeDecodeError object>
args = ('utf8', '\x82j\x85 Vu (feat. Jay-Z).mp3\r\n13 - Ring The Alarm.mp...ment.mp3\r\n15 - Listen (from the motion picture Dr', 0, 1, 'invalid start byte')
encoding = 'utf8'
end = 1
message = ''
object = '\x82j\x85 Vu (feat. Jay-Z).mp3\r\n13 - Ring The Alarm.mp...ment.mp3\r\n15 - Listen (from the motion picture Dr'
reason = 'invalid start byte'
start = 0
The above is a description of an error in a Python program. Here is
the original traceback:
Traceback (most recent call last):
File "./gettags.py", line 2939, in <module>
status = main()
File "./gettags.py", line 2934, in main
process_dir(path.decode(enc), options, database)
File "./gettags.py", line 1672, in process_dir
playlisttracks = read_playlistfile(ffn, filepath)
File "./gettags.py", line 2420, in read_playlistfile
for trackcountdata, trackdata in process_workvirtualfile_file(filespec, filepath, 'playlist'):
File "./gettags.py", line 2486, in process_workvirtualfile_file
pltracks = read_playlist(filespec, ex)
File "./gettags.py", line 2522, in read_playlist
return read_m3u_playlist(filespec)
File "./gettags.py", line 2530, in read_m3u_playlist
for line in codecs.open(filespec,'r','utf-8'):
File "C:\Python26\lib\codecs.py", line 684, in next
return self.reader.next()
File "C:\Python26\lib\codecs.py", line 615, in next
line = self.readline()
File "C:\Python26\lib\codecs.py", line 530, in readline
data = self.read(readsize, firstline=True)
File "C:\Python26\lib\codecs.py", line 477, in read
newchars, decodedbytes = self.decode(data, self.errors)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x82 in position 0: invalid start byte