simon-weber / gmusicapi

An unofficial client library for Google Music.
https://unofficial-google-music-api.readthedocs.io
BSD 3-Clause "New" or "Revised" License
2.48k stars 257 forks source link

Fails on playlist parsing #177

Closed jaduncan closed 11 years ago

jaduncan commented 11 years ago

What happened: failure to generate a list of songs on the intitial load What I expected to happen: to be able to do initial song load Reproducible: 100% of the time.


ERROR:gmusicapi.Webclient1:the response format for GetLibrarySongs was not recognized.

Failed to validate field 'playlist' list schema: additional property 'lastPlaybackTimestamp' not defined by 'properties' are not allowed in list item

First, try the develop branch. If you can recreate this error with the most recent code please create an issue that includes the above ValidationException and the following request/response: {'url': 'https://play.google.com/music/services/loadalltracks', 'headers': {'Authorization': ''}, 'data': {'json': '{}'}, 'method': 'POST', 'params': {'u': 0, 'xt': 'CjUKATASMEFNLVdiWGl0dFFrQm9oaFpubkd0MmduYXhILXM2ekJBREE6MTM4MDg4NzkwMTk2Mw=='}}

'{"playlistId":"all","requestTime":1380887602322000,"differentialUpdate":false,"playlist":[{"genre":"House","beatsPerMinute":0,"albumArtistNorm":"daft punk","artistNorm":"daft punk","album":"Discovery","lastPlayed":1365621742008319,"artistImageBaseUrl":"//lh6.googleusercontent.com/o2uJ47AczwwIQFOMycSXpBbKSjbAvV_1wv3NHJweMnb0fV5iolbP7lGiUt_AguS_iXy07NRK0TI","type":1,"recentTimestamp":1354720496779000,"disc":1,"id":"b8f2a9d8-396e-34f9-82a8-ac87b7750b39","composer":"","title":"Something About Us","albumArtist":"Daft Punk","artistMatchedId":"Ap6exarirw2ls3jjrhnf5p2lcvm","totalTracks":14,"subjectToCuration":false,"name":"Something About Us","totalDiscs":1,"year":2003,"titleNorm":"something about us","artist":"Daft Punk","albumNorm":"discovery","track":9,"origin":[1],"durationMillis":231103,"matchedId":"T6e33dlay4ucajcw565mkuiag2i","albumArtUrl":"//lh6.googleusercontent.com/V6w9vnn2_3MLTcD2ooVhCMx9kvzmUYczX7z_AQovIWok1WIC0oLhKTPIY8i-a5zGvDUm8RQvOg\u003ds130-c-e100","deleted":false,"url":"","c...'

A traceback follows: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/gmusicapi/protocol/shared.py", line 248, in perform cls.validate(response, parsed_response) File "/usr/local/lib/python2.7/dist-packages/gmusicapi/protocol/webclient.py", line 97, in validate return validictory.validate(msg, cls._res_schema) File "/usr/local/lib/python2.7/dist-packages/validictory/init.py", line 31, in validate return v.validate(data, schema) File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 559, in validate self._validate(data, schema) File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 562, in _validate self.validate("_data", {"_data": data}, schema) File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 593, in validate newschema.get(schemaprop)) File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 223, in validate_properties properties.get(eachProp)) File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 593, in __validate newschema.get(schemaprop)) File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 266, in validate_items (fieldname, old_error), fieldname, e.value) ValidationException: Failed to validate field 'playlist' list schema: additional property 'lastPlaybackTimestamp' not defined by 'properties' are not allowed in list item

simon-weber commented 11 years ago

This should be fixed already; I think it's #166. Can you try updating to develop and double checking for me?

jaduncan commented 11 years ago

Confirmed as working on develop branch, looks like it is #166 after all.

simon-weber commented 11 years ago

Sounds good -- thanks for looking into it.