From 051e6d49af3a5f222bebc689ed2f63523ce359e7 Mon Sep 17 00:00:00 2001 From: Niko Date: Tue, 23 Dec 2025 19:39:54 +0100 Subject: [PATCH] add warning when regex for uri fails --- CHANGELOG.md | 2 ++ spotipy/client.py | 1 + 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2865cdd..77834f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ Add your changes below. ### Added +- Added a warning if the URI regex did not match the input. + ### Fixed ### Removed diff --git a/spotipy/client.py b/spotipy/client.py index 92fe1da..6981f88 100644 --- a/spotipy/client.py +++ b/spotipy/client.py @@ -2140,6 +2140,7 @@ class Spotify: def _get_uri(self, type, id): if self._is_uri(id): + warnings.warn(f"{repr(id)} did not match the Spotify URI RegEx.", UserWarning) return id else: return "spotify:" + type + ":" + self._get_id(type, id)