From 7fad392d27e70d986fdd3b9bc55db9faaf23ef50 Mon Sep 17 00:00:00 2001 From: Rafael Moraes <50295204+glomatico@users.noreply.github.com> Date: Sat, 26 Jul 2025 12:13:58 -0300 Subject: [PATCH] Improve error message for missing sp_dc cookie --- votify/spotify_api.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/votify/spotify_api.py b/votify/spotify_api.py index edd5fdc..6ae28be 100644 --- a/votify/spotify_api.py +++ b/votify/spotify_api.py @@ -59,7 +59,10 @@ class SpotifyApi: ) sp_dc = parse_cookie("sp_dc") if sp_dc is None: - raise ValueError(f"Cookie file contain 'sp_dc' cookie.") + raise ValueError( + '"sp_dc" cookie not found in cookies. ' + "Make sure you have exported the cookies from the Spotify homepage and are logged in." + ) return cls(sp_dc=sp_dc) def _set_session(self):