Closed albersonn closed 8 years ago
Do you by chance have a lot of playlists, or playlists with a lot of songs?
If you could do one thing for me:
Open up /usr/local/lib/python2.7/dist-packages/pyportify/views.py
and on line 132, change
playlist.load()
to
playlist.load(timeout=60)
Run that and let me know if that works for you
Well, I have like LOTS of songs in LOTS of playlists. That time is in seconds? I guess I'll make it higher.
Yep, in seconds. Make it higher, and let me know what you set it to, I'll make it a permanent thing
Hehehe. Changed it to an hour (3600) and timed out. But this is my crazy long playlists. I'll set it to 10 hours and leave it overnight. Thank you though.
No good. But since I had like 100 playlists and most of it was albuns saved as playlists, I deleted almost all of them and now it worked. Sorry since I cannot provide you a good number of seconds to put in the code.
Just some error I had while transfering the music:
2015-02-21 15:40:47,520 - gmusicapi.Mobileclient1 (shared:281) [ERROR]: the response format for Search was not recognized.
Value {u'rating': u'5', u'albumArtRef': [{u'url': u'http://lh6.ggpht.com/3EZBc8bZy33G0B8fvNlZx_iLZgVV_75mLl-waUlgmRjOCPSVsEivI1vWlnM1Fqra_H_5F94DVA'}], u'lastRatingChangeTimestamp': u'1424453484137000', u'artistId': [u'Aeumsxlhnhsjmifx5vdp6ctxeam'], u'composer': u'', u'year': 2010, u'trackAvailableForSubscription': True, u'trackType': u'7', u'album': u'Brothers (Deluxe)', u'title': u'Tighten Up', u'albumArtist': u'The Black Keys', u'trackNumber': 3, u'discNumber': 1, u'albumAvailableForPurchase': True, u'contentType': u'2', u'trackAvailableForPurchase': True, u'storeId': u'T65isdtkhlhhcqgit6savye2vqi', u'nid': u'T65isdtkhlhhcqgit6savye2vqi', u'estimatedSize': u'8443847', u'albumId': u'Bv4dwjzxtmslm5namcvgsvm47fq', u'genre': u"'10s Rock", u'playCount': 1, u'kind': u'sj#track', u'artist': u'The Black Keys', u'durationMillis': u'211000'} for field '<obj>.entries[2].track' contains additional property 'lastRatingChangeTimestamp' not defined by 'properties' or 'patternProperties' and additionalProperties is False
First, try the develop branch. If you can recreate this error with the most recent code please [create an issue](http://goo.gl/qbAW8) that includes the above ValidationException and the following request/response:
{'url': 'https://www.googleapis.com/sj/v1.5/query', 'headers': {'Authorization': '<omitted>'}, 'params': {'q': u'The Black Keys - Tighten Up', 'max-results': 1}, 'method': 'GET'}
'{\n "kind": "sj#searchresponse",\n "entries": [\n {\n "type": "2",\n "artist": {\n "kind": "sj#artist",\n "name": "The Black Keys",\n "artistArtRef": "http://lh4.ggpht.com/JD-f7cmY6ycv-Kp2cWYNSXMjfJwTzmpGyE7i85Q9CgbUlJaZVoq0er-z1jvoqmjl6O3At2AlX9E",\n "artistId": "Aeumsxlhnhsjmifx5vdp6ctxeam"\n },\n "score": 505.305908203125,\n "best_result": true,\n "navigational_result": true,\n "navigational_confidence": 10.0\n },\n {\n "type": "3",\n "album": {\n "kind": "sj#album",\n "name": "The Big Come Up",\n "albumArtist": "The Black Keys",\n "albumArtRef": "http://lh5.ggpht.com/KqH9RLKOang--p4xAbTz7pF2NI62bkqlyqdxzJY_TSSUHHlO8lLfhvQKXMKgte7RxfclOzoh1g",\n "albumId": "Btqkxzpqp23btfz45jetibszl4q",\n "artist": "The Black Keys",\n "artistId": [\n "Aeumsxlhnhsjmifx5vdp6ctxeam"\n ],\n "year": 2002\n },\n "score": 184.4390869140625\n },\n {\n "type": "1",\n "track": {\n "kind": "sj#track",\n "title": "Tighten Up",\n "artist": "The Black Keys",\n "comp...'
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/mobileclient.py", line 214, in validate
return validictory.validate(msg, cls._res_schema)
File "/usr/local/lib/python2.7/dist-packages/validictory/__init__.py", line 36, in validate
return v.validate(data, schema)
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 543, in validate
self.__validate("data", {"data": data}, schema, '<obj>')
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 566, in __validate
validator(data, fieldname, schema, path, newschema.get(schemaprop))
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 244, in validate_properties
path + '.' + eachProp)
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 566, in __validate
validator(data, fieldname, schema, path, newschema.get(schemaprop))
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 275, in validate_items
'{}[{}]'.format(path, index))
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 566, in __validate
validator(data, fieldname, schema, path, newschema.get(schemaprop))
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 244, in validate_properties
path + '.' + eachProp)
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 566, in __validate
validator(data, fieldname, schema, path, newschema.get(schemaprop))
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 353, in validate_additionalProperties
" is False", value, fieldname, prop=eachProperty, path=path)
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 176, in _error
raise err
ValidationException: Value {u'rating': u'5', u'albumArtRef': [{u'url': u'http://lh6.ggpht.com/3EZBc8bZy33G0B8fvNlZx_iLZgVV_75mLl-waUlgmRjOCPSVsEivI1vWlnM1Fqra_H_5F94DVA'}], u'lastRatingChangeTimestamp': u'1424453484137000', u'artistId': [u'Aeumsxlhnhsjmifx5vdp6ctxeam'], u'composer': u'', u'year': 2010, u'trackAvailableForSubscription': True, u'trackType': u'7', u'album': u'Brothers (Deluxe)', u'title': u'Tighten Up', u'albumArtist': u'The Black Keys', u'trackNumber': 3, u'discNumber': 1, u'albumAvailableForPurchase': True, u'contentType': u'2', u'trackAvailableForPurchase': True, u'storeId': u'T65isdtkhlhhcqgit6savye2vqi', u'nid': u'T65isdtkhlhhcqgit6savye2vqi', u'estimatedSize': u'8443847', u'albumId': u'Bv4dwjzxtmslm5namcvgsvm47fq', u'genre': u"'10s Rock", u'playCount': 1, u'kind': u'sj#track', u'artist': u'The Black Keys', u'durationMillis': u'211000'} for field '<obj>.entries[2].track' contains additional property 'lastRatingChangeTimestamp' not defined by 'properties' or 'patternProperties' and additionalProperties is False
2015-02-21 15:40:47 [3402] [ERROR] shared.py:281:perform the response format for Search was not recognized.
Value {u'rating': u'5', u'albumArtRef': [{u'url': u'http://lh6.ggpht.com/3EZBc8bZy33G0B8fvNlZx_iLZgVV_75mLl-waUlgmRjOCPSVsEivI1vWlnM1Fqra_H_5F94DVA'}], u'lastRatingChangeTimestamp': u'1424453484137000', u'artistId': [u'Aeumsxlhnhsjmifx5vdp6ctxeam'], u'composer': u'', u'year': 2010, u'trackAvailableForSubscription': True, u'trackType': u'7', u'album': u'Brothers (Deluxe)', u'title': u'Tighten Up', u'albumArtist': u'The Black Keys', u'trackNumber': 3, u'discNumber': 1, u'albumAvailableForPurchase': True, u'contentType': u'2', u'trackAvailableForPurchase': True, u'storeId': u'T65isdtkhlhhcqgit6savye2vqi', u'nid': u'T65isdtkhlhhcqgit6savye2vqi', u'estimatedSize': u'8443847', u'albumId': u'Bv4dwjzxtmslm5namcvgsvm47fq', u'genre': u"'10s Rock", u'playCount': 1, u'kind': u'sj#track', u'artist': u'The Black Keys', u'durationMillis': u'211000'} for field '<obj>.entries[2].track' contains additional property 'lastRatingChangeTimestamp' not defined by 'properties' or 'patternProperties' and additionalProperties is False
First, try the develop branch. If you can recreate this error with the most recent code please [create an issue](http://goo.gl/qbAW8) that includes the above ValidationException and the following request/response:
{'url': 'https://www.googleapis.com/sj/v1.5/query', 'headers': {'Authorization': '<omitted>'}, 'params': {'q': u'The Black Keys - Tighten Up', 'max-results': 1}, 'method': 'GET'}
'{\n "kind": "sj#searchresponse",\n "entries": [\n {\n "type": "2",\n "artist": {\n "kind": "sj#artist",\n "name": "The Black Keys",\n "artistArtRef": "http://lh4.ggpht.com/JD-f7cmY6ycv-Kp2cWYNSXMjfJwTzmpGyE7i85Q9CgbUlJaZVoq0er-z1jvoqmjl6O3At2AlX9E",\n "artistId": "Aeumsxlhnhsjmifx5vdp6ctxeam"\n },\n "score": 505.305908203125,\n "best_result": true,\n "navigational_result": true,\n "navigational_confidence": 10.0\n },\n {\n "type": "3",\n "album": {\n "kind": "sj#album",\n "name": "The Big Come Up",\n "albumArtist": "The Black Keys",\n "albumArtRef": "http://lh5.ggpht.com/KqH9RLKOang--p4xAbTz7pF2NI62bkqlyqdxzJY_TSSUHHlO8lLfhvQKXMKgte7RxfclOzoh1g",\n "albumId": "Btqkxzpqp23btfz45jetibszl4q",\n "artist": "The Black Keys",\n "artistId": [\n "Aeumsxlhnhsjmifx5vdp6ctxeam"\n ],\n "year": 2002\n },\n "score": 184.4390869140625\n },\n {\n "type": "1",\n "track": {\n "kind": "sj#track",\n "title": "Tighten Up",\n "artist": "The Black Keys",\n "comp...'
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/mobileclient.py", line 214, in validate
return validictory.validate(msg, cls._res_schema)
File "/usr/local/lib/python2.7/dist-packages/validictory/__init__.py", line 36, in validate
return v.validate(data, schema)
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 543, in validate
self.__validate("data", {"data": data}, schema, '<obj>')
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 566, in __validate
validator(data, fieldname, schema, path, newschema.get(schemaprop))
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 244, in validate_properties
path + '.' + eachProp)
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 566, in __validate
validator(data, fieldname, schema, path, newschema.get(schemaprop))
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 275, in validate_items
'{}[{}]'.format(path, index))
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 566, in __validate
validator(data, fieldname, schema, path, newschema.get(schemaprop))
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 244, in validate_properties
path + '.' + eachProp)
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 566, in __validate
validator(data, fieldname, schema, path, newschema.get(schemaprop))
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 353, in validate_additionalProperties
" is False", value, fieldname, prop=eachProperty, path=path)
File "/usr/local/lib/python2.7/dist-packages/validictory/validator.py", line 176, in _error
raise err
ValidationException: Value {u'rating': u'5', u'albumArtRef': [{u'url': u'http://lh6.ggpht.com/3EZBc8bZy33G0B8fvNlZx_iLZgVV_75mLl-waUlgmRjOCPSVsEivI1vWlnM1Fqra_H_5F94DVA'}], u'lastRatingChangeTimestamp': u'1424453484137000', u'artistId': [u'Aeumsxlhnhsjmifx5vdp6ctxeam'], u'composer': u'', u'year': 2010, u'trackAvailableForSubscription': True, u'trackType': u'7', u'album': u'Brothers (Deluxe)', u'title': u'Tighten Up', u'albumArtist': u'The Black Keys', u'trackNumber': 3, u'discNumber': 1, u'albumAvailableForPurchase': True, u'contentType': u'2', u'trackAvailableForPurchase': True, u'storeId': u'T65isdtkhlhhcqgit6savye2vqi', u'nid': u'T65isdtkhlhhcqgit6savye2vqi', u'estimatedSize': u'8443847', u'albumId': u'Bv4dwjzxtmslm5namcvgsvm47fq', u'genre': u"'10s Rock", u'playCount': 1, u'kind': u'sj#track', u'artist': u'The Black Keys', u'durationMillis': u'211000'} for field '<obj>.entries[2].track' contains additional property 'lastRatingChangeTimestamp' not defined by 'properties' or 'patternProperties' and additionalProperties is False
@albersonn I neglected to specify a min version of gmusicapi, it looks like you might be using an older one.
Try sudo pip install --upgrade gmusicapi
, it should fix the problem.
Also, bummer about the big playlists not transferring.
I actually ran into this myself, reopening
I'm seeing the same behavior, though I think it's caused by a different issue. Here's the relevant output from the log:
127.0.0.1 - - [2015-03-13 10:52:59] "POST /google/login HTTP/1.1" 200 161 0.249992
127.0.0.1 - - [2015-03-13 10:52:59] "GET /partials/spotify_login.html HTTP/1.1" 200 1490 0.002578
127.0.0.1 - - [2015-03-13 10:53:00] "GET /img/s.png HTTP/1.1" 200 3510 0.000972
127.0.0.1 - - [2015-03-13 10:53:07] "POST /spotify/login HTTP/1.1" 200 161 0.742188
127.0.0.1 - - [2015-03-13 10:53:07] "GET /partials/playlists.html HTTP/1.1" 200 1373 0.000917
127.0.0.1 - - [2015-03-13 10:53:17] "GET /spotify/playlists HTTP/1.1" 500 412 10.018496
Not sure why spotify is returning 500.
@joemccall86 this looks the same as the timeouts (your http request took ~10 seconds, the same as the timeout). Try the change in https://github.com/rckclmbr/pyportify/issues/15#issuecomment-75304563
Removed dependency on libspotify, thus the hard limit. This should be resolved.
I just tried to transfer some playlists but none is showing in step 3.
this is what terminal shows me: