You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please type example code that produces the issue: user = User('Zazhigalo4ka', API_KEY, API_SECRET, SESSION_KEY)
p = user.getPlaylistIDs()
pid = p[0]
playlist = Playlist('lastfm://playlist/%s' % pid, API_KEY, API_SECRET, SESSION_KEY)
tracks = playlist.fetch()
t1 = tracks[1]
t1.getTitle()
t1.getTags() What is the expected output? What do you see instead? I expect the title (which is printed) and the tags (which are not printed). The following error is
reported:
Traceback (most recent call last):
File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/
pylast.py", line 514, in getTags
doc = Request(self, self.ws_prefix + '.getTags', self.api_key, params, True, self.secret).execute
()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/
pylast.py", line 285, in execute
self.params['api_sig'] = self._getSignature()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/
pylast.py", line 275, in _getSignature
hash.update(string)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 52-54: ordinal not in range
(128) What version of pyLast is this? pyLast-0.2b13 Please provide any additional information below. This happens both with Python 2.5 and Python 2.6, and I guess the problem is related to the
creation of the MD5 hash with a track that contains non-ASCII characters. The last.fm page http://www.last.fm/api/authspec reminds to "Ensure your parameters are utf8 encoded.", so the
problem might be there.
From claud...@gmail.com on October 19, 2008 19:27:42
Please type example code that produces the issue: user = User('Zazhigalo4ka', API_KEY, API_SECRET, SESSION_KEY)
p = user.getPlaylistIDs()
pid = p[0]
playlist = Playlist('lastfm://playlist/%s' % pid, API_KEY, API_SECRET, SESSION_KEY)
tracks = playlist.fetch()
t1 = tracks[1]
t1.getTitle()
t1.getTags() What is the expected output? What do you see instead? I expect the title (which is printed) and the tags (which are not printed). The following error is
reported:
Traceback (most recent call last):
File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/
pylast.py", line 514, in getTags
doc = Request(self, self.ws_prefix + '.getTags', self.api_key, params, True, self.secret).execute
()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/
pylast.py", line 285, in execute
self.params['api_sig'] = self._getSignature()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/
pylast.py", line 275, in _getSignature
hash.update(string)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 52-54: ordinal not in range
(128) What version of pyLast is this? pyLast-0.2b13 Please provide any additional information below. This happens both with Python 2.5 and Python 2.6, and I guess the problem is related to the
creation of the MD5 hash with a track that contains non-ASCII characters. The last.fm page http://www.last.fm/api/authspec reminds to "Ensure your parameters are utf8 encoded.", so the
problem might be there.
(Thanks again for this package, by the way!!)
Original issue: http://code.google.com/p/pylast/issues/detail?id=7
The text was updated successfully, but these errors were encountered: