Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Longer Working as of HA 2024.12.2 #5

Open
AnshulJ999 opened this issue Dec 11, 2024 · 3 comments
Open

No Longer Working as of HA 2024.12.2 #5

AnshulJ999 opened this issue Dec 11, 2024 · 3 comments

Comments

@AnshulJ999
Copy link

Describe the bug
The Spotify Plus integration is no longer working. The media player remains unavailable.

Expected behavior
The media player should show the playback state of Spotify.
Screenshots
If applicable, add screenshots to help explain your problem.

Environment details:

  • Environment (HASSIO, Raspbian, etc): HA OS
  • Home Assistant version installed: 2024.12.2
  • Component version installed: 1.1.9
  • Last know working version: 1.1.9
  • Spotify Account Type: Premium

Output of HA logs
Paste the relavant output of the HA log here.

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:737
integration: Sensor (documentation, issues)
First occurred: 12:14:33 AM (2 occurrences)
Last logged: 12:48:43 AM

spotify_plus: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/spotipy/client.py", line 271, in _internal_call
    response.raise_for_status()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api.spotify.com/v1/recommendations/available-genre-seeds

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 737, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1318, in async_device_update
    await self.async_update()
  File "/config/custom_components/spotify_plus/sensor.py", line 227, in async_update
    ) = await asyncio.gather(
        ^^^^^^^^^^^^^^^^^^^^^
    ...<6 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.13/site-packages/spotipy/client.py", line 1717, in recommendation_genre_seeds
    return self._get("recommendations/available-genre-seeds")
           ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/spotipy/client.py", line 323, in _get
    return self._internal_call("GET", url, payload, kwargs)
           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/spotipy/client.py", line 293, in _internal_call
    raise SpotifyException(
    ...<5 lines>...
    )
spotipy.exceptions.SpotifyException: http status: 404, code:-1 - https://api.spotify.com/v1/recommendations/available-genre-seeds:
 None, reason: None

This error originated from a custom integration.

Logger: spotipy.client
Source: custom_components/spotify_plus/media_player.py:417
integration: Spotify Plus (documentation, issues)
First occurred: 12:14:34 AM (714 occurrences)
Last logged: 12:50:14 AM

HTTP Error for GET to https://api.spotify.com/v1/playlists/37i9dQZF1FoyQGyinuuvRu with Params: {'fields': None, 'market': None, 'additional_types': 'track'} returned 404 due to Resource not found

Additional context
Add any other context about the problem here.

I am not sure if this integration is still actively developed, but I really liked it, and would really appreciate if it can be fixed.

Thanks.

@hokiebrian
Copy link
Owner

Thank you for raising the issue. Unfortunately, Spotify has removed access to certain API endpoints, many of which were core to this integration. I am working on getting it "dumbed down" to remove the affected elements, it's just taking time. I hope to have it updated by the end of the weekend.

Spotify announcement: https://developer.spotify.com/blog/2024-11-27-changes-to-the-web-api

@ColtonYYZ
Copy link

Any update on this? I was really looking forward to seeing my queued songs and your integration is the only one that can supply it. The other Spotify Plus integration doesn't go deep enough with their sensors. (I was hoping to use this:
spotify_plus.spotify_extras)

@hokiebrian
Copy link
Owner

I'm still working on it. Along with Spotify removing some endpoints, I need to change away from Spotipy to aiospotify and those are taking some time. Progress is being made...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants