EnigmaCurry / GMusicFS

A FUSE filesystem for Google Music
153 stars 36 forks source link

Exception thrown when -t parameter is used: AttributeError: 'list' object has no attribute 'strip' #7

Open ghost opened 11 years ago

ghost commented 11 years ago

When I use real file sizes, GMusicFS doesn't work at all, just throws an exception when I try and browse directory contents.

When I use fake sizes (no -t), then everything works as expected.

DEBUG:fuse.log-mixin:<- readdir '[Unhandled Exception]' Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/fuse.py", line 420, in _wrapper return func(_args, _kwargs) or 0 File "/usr/local/lib/python2.7/dist-packages/fuse.py", line 608, in readdir fip.contents.fh): File "/usr/local/lib/python2.7/dist-packages/fuse.py", line 887, in call ret = getattr(self, op)(path, args) File "/usr/local/lib/python2.7/dist-packages/gmusicfs/gmusicfs.py", line 344, in readdir for track in album.get_tracks(get_size=True): File "/usr/local/lib/python2.7/dist-packages/gmusicfs/gmusicfs.py", line 55, in get_tracks r = urllib2.Request(self.get_track_stream(t)) File "/usr/lib/python2.7/urllib2.py", line 202, in init self.__original = unwrap(url) File "/usr/lib/python2.7/urllib.py", line 1057, in unwrap url = url.strip() AttributeError: 'list' object has no attribute 'strip'

ghost commented 10 years ago

To solve this, you need to edit gmusicfs.py, line 55, change: r = urllib2.Request(self.get_track_stream(t)) r = urllib2.Request(self.get_track_stream(t)[0])