mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-27 00:25:54 +03:00
[GH-ISSUE #865] ValueError on recommendations #533
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#533
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 @Fertzzuu on GitHub (Oct 6, 2022).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/865
Describe the bug
A ValueError is thrown when calling recommendations with seed tracks:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()Your code
recommendations = api.recommendations(seed_tracks=sample_tracks, limit=20)
Expected behavior
Return the recommendations
Output
Environment:
@Peter-Schorn commented on GitHub (Oct 7, 2022):
Is
sample_tracksa numpy array? If so, you need to convert it to a python list usinglist(sample_tracks)before you pass it into any methods in this library.@dieser-niko commented on GitHub (May 23, 2024):
Closing as there is no activity or reply from the author.