[pylast] Problems scrobbling - "Invalid Rating"

14 views
Skip to first unread message

Ed Menendez

unread,
May 23, 2010, 6:17:46 PM5/23/10
to pylast
Has anyone seen this error before?

>>> s.scrobble(artist='U2', title='One', time_started=int(time()), source='SCROBBLE_SOURCE_NON_PERSONALIZED_BROADCAST',
mode='SCROBBLE_MODE_PLAYED', duration=1000)
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "C:\projects\menendez\pylast.py", line 3672, in scrobble
"""
File "C:\projects\menendez\pylast.py", line 3560, in execute
connection.request("GET", self.subdir + "?" + data, headers =
headers)
File "C:\projects\menendez\pylast.py", line 3583, in
_check_response_for_errors
elif status_line == "BadTimeError":
ScrobblingError: Plugin bug: Not all request variables are set -
Invalid Rating

I think rating has to do with the "Like" feature. If I add this to the
execute() method in _ScrobblerRequest():

if not self.params.has_key('r'):
self.params['r[0]'] = ''

Errors go away. However it still doesn't scrobble. Am I doing
something wrong and masking the problem now? Here is what it's sending
to last.fm.

self.params --> {'n[0]': '', 'a[0]': 'U2', 's': {removed}, 'm[0]': '',
't[0]': 'One', 'i[0]': '1274652720', 'b[0]': '', 'r[0]': '', 'l[0]':
'1000', 'o[0]': 'SCROBBLE_SOURCE_NON_PERSONALIZED_BROADCAST'}
data --> n[0]=&a[0]=U2&s={removed}
&m[0]=&t[0]=One&i[0]=1274652720&b[0]=&r[0]=&l[0]=1000&o[0]=SCROBBLE_SOURCE_NON_PERSONALIZED_BROADCAST
headers --> {'Accept-Charset': 'utf-8', 'HOST':
'post2.audioscrobbler.com:80', 'Content-type': 'application/x-www-form-
urlencode
d', 'User-Agent': 'pylast/0.4'}
self.subdir --> /protocol_1.2

It responded with "OK". Yet nothing is scrobbled for the user.

--
You received this message because you are subscribed to the pylast mailing list.
To post to this mailing list, send email to pyl...@googlegroups.com
To unsubscribe from this group, send email to
pylast+un...@googlegroups.com
pylast is a python wrapper around last.fm's api. the project is hosted at http://code.google.com/p/pylast/ and the mailing list/group is at http://groups.google.com/group/pylast
Reply all
Reply to author
Forward
0 new messages