Skip to content

Public.song_search returns 401 error #69

@LostShadowGD

Description

@LostShadowGD

Running Public.song_search(query) returns:

Traceback (most recent call last):
  File "/Users/REDACTED/main.py", line 65, in <module>
    songSearch(input("Search: "))
  File "/Users/REDACTED/main.py", line 38, in songSearch
    spotifyData = locateSongOnSpotify(title, ytURL)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/REDACTED/main.py", line 46, in locateSongOnSpotify
    results = list(public.Public.song_search(title))
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/spotapi/public.py", line 90, in song_search
    yield from song.paginate_songs(query)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/spotapi/song.py", line 121, in paginate_songs
    songs = self.query_songs(query, limit=UPPER_LIMIT)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/spotapi/types/annotations.py", line 47, in wrapper
    result: R = func(*args, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/spotapi/song.py", line 106, in query_songs
    raise SongError("Could not get songs", error=resp.error.string)
spotapi.exceptions.errors.SongError: Could not get songs

there's 2 issues here.

  1. resp.error.string is not correctly appended to the error message
    and (clearly) more importantly
  2. song search doesn't work

this was working 6 days ago. I did nothing. This happens on the Github release AND the PyPI release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions