502 Error while searching SoundCloud playlists
import soundcloud
client = soundcloud.Client(client_id='mykey')
page_size = 10
tracks = client.get('/tracks', q='lorde',limit=page_size)
users = client.get('/users', q='lorde',limit=page_size)
sets = client.get('/playlists',q='lorde',limit=page_size)
In the above Python code extract, while tracks and users are working fine, the last line returns the following error.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "soundcloud/client.py", line 130, in _request
return wrapped_resource(make_request(method, url, kwargs))
File "soundcloud/request.py", line 134, in make_request
result.raise_for_status()
File "/Library/Python/2.7/site-packages/requests/models.py", line 829, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 502 Server Error: Bad Gateway
For phrases that return fewer results, such as "banana phone", the query works fine (albeit a little slow). However, an error is returned for a search that returns more results. This search also works on the website, so I guess it has something to do with the fact that I am using soundcloud-python. What am I doing wrong and how can I resolve this error?
+3
source to share
No one has answered this question yet
See similar questions:
or similar: