Doesn't play for me ("Pandora does not support your client version") #28

Closed
llimllib opened this Issue Nov 9, 2011 · 7 comments

Projects

None yet

2 participants

@llimllib
Contributor
llimllib commented Nov 9, 2011
(89293) 2011-11-09 09:38:56,101 - socket reactor - ERROR - error in writers
Traceback (most recent call last):
  File "pypandora.py", line 1991, in run
    try: sock.handle_write(self.shared_data, self)
  File "pypandora.py", line 1838, in handle_write
    if pandora: self.send_json(pandora.json_data)
  File "pypandora.py", line 379, in json_data
    data["stations"] = [(id, station.name) for id,station in self.stations.iteritems()]
  File "pypandora.py", line 396, in stations
    xml = self.connection.send(get, body)
  File "pypandora.py", line 229, in send
    return self.send(get_data, body, sync_on_error=False)
  File "pypandora.py", line 231, in send
    raise PandoraException, fault
PandoraException: org.apache.xmlrpc.XmlRpcException: 000.000.000.000|0|INCOMPATIBLE_VERSION|Pandora does not support your client version.
Contributor
llimllib commented Nov 9, 2011

Also:

(95069) 2011-11-09 09:48:33,221 - account llimllib - INFO - fetching stations
(95069) 2011-11-09 09:48:33,436 - pandora - ERROR - got 'incompatible version' from pandora! emergency sync
(95069) 2011-11-09 09:48:33,436 - root - INFO - syncing settings

followed by a big long "saving values" block, then the error above.

Contributor
llimllib commented Nov 9, 2011

Incrementing the protocol version to 33 gets me a bit further, but then:

(4671) 2011-11-09 10:13:59,473 - <WebConnection 127.0.0.1:51035> - INFO - connected
(4671) 2011-11-09 10:13:59,486 - pandora - INFO - syncing time
(4671) 2011-11-09 10:14:00,054 - socket reactor - ERROR - error in writers
Traceback (most recent call last):
  File "pypandora.py", line 1991, in run
    try: sock.handle_write(self.shared_data, self)
  File "pypandora.py", line 1858, in handle_write
    try: pandora_account = Account(reactor, username, password)
  File "pypandora.py", line 311, in __init__
    self.login()
  File "pypandora.py", line 360, in login
    self.connection.sync()
  File "pypandora.py", line 260, in sync
    timestamp = int(time.time() - int("".join(timestamp_chars)))
ValueError: invalid literal for int() with base 10: ''
(4671) 2011-11-09 10:14:00,064 - account bill.mill@gmail.com - INFO - fetching stations
(4671) 2011-11-09 10:14:00,274 - socket reactor - ERROR - error in writers
Traceback (most recent call last):
  File "pypandora.py", line 1991, in run
    try: sock.handle_write(self.shared_data, self)
  File "pypandora.py", line 1838, in handle_write
    if pandora: self.send_json(pandora.json_data)
  File "pypandora.py", line 379, in json_data
    data["stations"] = [(id, station.name) for id,station in self.stations.iteritems()]
  File "pypandora.py", line 396, in stations
    xml = self.connection.send(get, body)
  File "pypandora.py", line 231, in send
    raise PandoraException, fault
PandoraException: com.savagebeast.radio.api.protocol.xmlrpc.RadioXmlRpcException: 192.168.160.96|1320851640832|OUT_OF_SYNC|You have no chance to survive make your time.
Contributor
llimllib commented Nov 9, 2011

Debugging into it a bit shows that timestamp probably isn't what you were expecting:

256     
257                 timestamp_chars = []
258                 import pdb; pdb.set_trace()
259                 for c in timestamp:
260                     if c.isdigit(): timestamp_chars.append(c)
261  ->             timestamp = int(time.time() - int("".join(timestamp_chars)))
262     
263             self.timeoffset = timestamp     
264             return True
265     
266     
(Pdb) timestamp
'2o\x9c\x13\x84\x14xe\xd9]\xddm\xfe\xab\x87b'
(Pdb) filter(lambda x: x.isdigit(), timestamp)
'2'

And I don't think I'm going to work on it any farther, but I'm happy to help you debug it if it works for you.

Owner
amoffat commented Nov 9, 2011

Thanks a ton @illimllib. This happens when Pandora changes their protocol version and encryption/decryption keys unexpectedly to break custom clients like this. Fortunately I planned for it, so as soon as I extract the new keys and post them on my github, your code should sync itself automatically. I'll update this issue when it's done

Contributor
llimllib commented Nov 9, 2011

sweet, looking forward to using it

Owner
amoffat commented Nov 9, 2011

pandora threw in some serious breakage. the pianobar people are dealing with it too, everyone can follow the developments in this thread: PromyLOPh/pianobar#174

Owner
amoffat commented Nov 9, 2011

should be fixed temporarily, you'll need to download the new player @ https://raw.github.com/amoffat/pypandora/master/pypandora.py

@amoffat amoffat closed this Nov 10, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment