mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-27 00:25:54 +03:00
[GH-ISSUE #953] I found 400 bad request in client.recommandations #575
Labels
No labels
api-bug
bug
dependencies
documentation
duplicate
enhancement
external-ide
headless-mode
implicit-grant-flow
invalid
missing-endpoint
pr-welcome
private-api
pull-request
question
spotipy3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotipy#575
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Masterolic on GitHub (Mar 25, 2023).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/953
Describe the bug
A clear and concise description of what the bug is.
Your code
Share a complete minimal working example.
Expected behavior
A clear and concise description of what you expected to happen.
Output
Paste and format errors (with complete stacktrace) or logs. Make sure to remove sensitive information.
Environment:
Additional context
Hello I had faced 400 bad request in client.recomme dations i had correctly added the parameters but I get 400 bad request
raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.spotify.com/v1/recommendations?limit=10&seed_artists=2%2C5%2CY%2Cx%2C8%2CK%2C7%2Cv%2Cr%2CX%2CF%2C2%2C9%2C7%2CO%2CN%2CG%2CF%2Ce%2CS%2CA%2CK&seed_genres=c%2Cl%2Ca%2Cs%2Cs%2Ci%2Cc%2Ca%2Cl%2C%2C%2Cc%2Co%2Cu%2Cn%2Ct%2Cr%2Cy&seed_tracks=0%2CQ%2Cv%2CO%2Cj%2Cx%2Cx%2CO%2CT%2CM%2CI%2CZ%2CZ%2CI%2CL%2Cz%2C8%2CZ%2Cf%2Cf%2CF%2Cn During handling of the above exception, another exception occurred:Traceback (most recent call last): File "/usr/local/lib/python3.11/dist-packages/spotipy/client.py", line 271, in _internal_call response.raise_for_status() File "/usr/local/lib/python3.11/dist-packages/requests/models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.spotify.com/v1/recommendations?limit=10&seed_artists=2%2C5%2CY%2Cx%2C8%2CK%2C7%2Cv%2Cr%2CX%2CF%2C2%2C9%2C7%2CO%2CN%2CG%2CF%2Ce%2CS%2CA%2CK&seed_genres=c%2Cl%2Ca%2Cs%2Cs%2Ci%2Cc%2Ca%2Cl%2C%2C%2Cc%2Co%2Cu%2Cn%2Ct%2Cr%2Cy&seed_tracks=0%2CQ%2Cv%2CO%2Cj%2Cx%2Cx%2CO%2CT%2CM%2CI%2CZ%2CZ%2CI%2CL%2Cz%2C8%2CZ%2Cf%2Cf%2CF%2Cn During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.11/dist-packages/pyrogram/dispatcher.py", line 240, in handler_worker await handler.callback(self.client, *args) File "/root/Spotify-downloa-bot/mbot/plugins/Spotify.py", line 805, in album items=client.recommendations(seed_artists=track['artists'][0]['id'],seed_tracks=item_id,seed_genres="classical,country",limit=10,) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/spotipy/client.py", line 1712, in recommendations return self._get("recommendations", **params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/spotipy/client.py", line 323, in _get return self._internal_call("GET", url, payload, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/spotipy/client.py", line 293, in _internal_call raise SpotifyException( spotipy.exceptions.SpotifyException: http status: 400, code:-1 - https://api.spotify.com/v1/recommendations?limit=10&seed_artists=2%2C5%2CY%2Cx%2C8%2CK%2C7%2Cv%2Cr%2CX%2CF%2C2%2C9%2C7%2CO%2CN%2CG%2CF%2Ce%2CS%2CA%2CK&seed_genres=c%2Cl%2Ca%2Cs%2Cs%2Ci%2Cc%2Ca%2Cl%2C%2C%2Cc%2Co%2Cu%2Cn%2Ct%2Cr%2Cy&seed_tracks=0%2CQ%2Cv%2CO%2Cj%2Cx%2Cx%2CO%2CT%2CM%2CI%2CZ%2CZ%2CI%2CL%2Cz%2C8%2CZ%2Cf%2Cf%2CF%2Cn: invalid request, reason: NoneFor screenshot
https://graph.org/file/78ad5cdbbe547450ca289.jpg
@stephanebruckert commented on GitHub (Jul 9, 2024):
Are you still getting this?