[GH-ISSUE #367] Invalid calls to logging method #215

Closed
opened 2026-02-27 23:21:25 +03:00 by kerem · 6 comments
Owner

Originally created by @kellcomnet2 on GitHub (Apr 11, 2019).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/367

Versions:

spotipy in /usr/local/lib/python3.5/dist-packages (2.4.4)
requests>=1.0 in /usr/lib/python3/dist-packages (from spotipy) (2.21.0)

Error

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/spotdl/downloader.py", line 207, in _download_list
    track_dl = Downloader(raw_song, number=number)
  File "/usr/local/lib/python3.5/dist-packages/spotdl/downloader.py", line 98, in __init__
    self.content, self.meta_tags = youtube_tools.match_video_and_metadata(raw_song)
  File "/usr/local/lib/python3.5/dist-packages/spotdl/youtube_tools.py", line 76, in match_video_and_metadata
    meta_tags = spotify_tools.generate_metadata(track)
  File "/usr/local/lib/python3.5/dist-packages/spotdl/spotify_tools.py", line 34, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/spotdl/spotify_tools.py", line 48, in generate_metadata
    meta_tags = spotify.track(raw_song)
  File "/usr/local/lib/python3.5/dist-packages/spotipy/client.py", line 222, in track
    trid = self._get_id('track', track_id)
  File "/usr/local/lib/python3.5/dist-packages/spotipy/client.py", line 850, in _get_id
    type, fields[-2], id)
TypeError: _warn() takes 2 positional arguments but 5 were given
Originally created by @kellcomnet2 on GitHub (Apr 11, 2019). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/367 Versions: spotipy in /usr/local/lib/python3.5/dist-packages (2.4.4) requests>=1.0 in /usr/lib/python3/dist-packages (from spotipy) (2.21.0) Error Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/spotdl/downloader.py", line 207, in _download_list track_dl = Downloader(raw_song, number=number) File "/usr/local/lib/python3.5/dist-packages/spotdl/downloader.py", line 98, in __init__ self.content, self.meta_tags = youtube_tools.match_video_and_metadata(raw_song) File "/usr/local/lib/python3.5/dist-packages/spotdl/youtube_tools.py", line 76, in match_video_and_metadata meta_tags = spotify_tools.generate_metadata(track) File "/usr/local/lib/python3.5/dist-packages/spotdl/spotify_tools.py", line 34, in wrapper return func(*args, **kwargs) File "/usr/local/lib/python3.5/dist-packages/spotdl/spotify_tools.py", line 48, in generate_metadata meta_tags = spotify.track(raw_song) File "/usr/local/lib/python3.5/dist-packages/spotipy/client.py", line 222, in track trid = self._get_id('track', track_id) File "/usr/local/lib/python3.5/dist-packages/spotipy/client.py", line 850, in _get_id type, fields[-2], id) TypeError: _warn() takes 2 positional arguments but 5 were given
kerem closed this issue 2026-02-27 23:21:25 +03:00
Author
Owner

@NotFunnyMan commented on GitHub (Apr 12, 2019):

Nothing is clear from the data you provided. You would at least give the source code where the error occurs and what data you pass to the method that crashes.

<!-- gh-comment-id:482409506 --> @NotFunnyMan commented on GitHub (Apr 12, 2019): Nothing is clear from the data you provided. You would at least give the source code where the error occurs and what data you pass to the method that crashes.
Author
Owner

@stephanebruckert commented on GitHub (Jan 11, 2020):

Looks like the user is using another app called spotdl, which is not calling spotipy correctly. Closing but feel free to reopen with more specific information

<!-- gh-comment-id:573345276 --> @stephanebruckert commented on GitHub (Jan 11, 2020): Looks like the user is using another app called spotdl, which is not calling spotipy correctly. Closing but feel free to reopen with more specific information
Author
Owner

@ritiek commented on GitHub (Jan 11, 2020):

@stephanebruckert This issue is valid. #297 fixes this.

<!-- gh-comment-id:573345765 --> @ritiek commented on GitHub (Jan 11, 2020): @stephanebruckert This issue is valid. #297 fixes this.
Author
Owner

@stephanebruckert commented on GitHub (Jan 11, 2020):

Indeed... nice catch. I skim-read the stacktrace.

Edit: oh, and that's your app! sorry 😊

<!-- gh-comment-id:573346063 --> @stephanebruckert commented on GitHub (Jan 11, 2020): Indeed... nice catch. I skim-read the stacktrace. Edit: oh, and that's your app! sorry :blush:
Author
Owner

@ritiek commented on GitHub (Jan 11, 2020):

No worries! The traceback alone can indeed be confusing.

<!-- gh-comment-id:573346391 --> @ritiek commented on GitHub (Jan 11, 2020): No worries! The traceback alone can indeed be confusing.
Author
Owner

@stephanebruckert commented on GitHub (Jan 12, 2020):

Fixed by https://github.com/plamere/spotipy/pull/371

<!-- gh-comment-id:573426138 --> @stephanebruckert commented on GitHub (Jan 12, 2020): Fixed by https://github.com/plamere/spotipy/pull/371
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#215
No description provided.