Skip to content
This repository was archived by the owner on Apr 16, 2019. It is now read-only.

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

Open
ghost opened this issue Jun 29, 2013 · 1 comment

Comments

@ghost
Copy link

ghost commented Jun 29, 2013

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
Copy link
Author

ghost commented Jan 7, 2014

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])

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants