SathyaBhat / spotify-dl

Downloads songs from your Spotify Playlist
http://sathyasays.com/2015/12/29/spotify-dl-download-your-spotify-my-music-songs-as-mp3/
MIT License
1.76k stars 214 forks source link

Can't get it to work #182

Closed andrewtanyinkit closed 3 years ago

andrewtanyinkit commented 3 years ago

I am using a windows 10 machine, at first try (spotify_dl true -l https://open.spotify.com/track/xxxxxxxxxxxxxxx?si=xxxxxxxxxxxxxxx -V -m -o E:\) i got a message

You need to set your Spotify API credentials. You can do this by setting environment variables like so:

        export SPOTIPY_CLIENT_ID='your-spotify-client-id'
        export SPOTIPY_CLIENT_SECRET='your-spotify-client-secret'
        Get your credentials at
            https://developer.spotify.com/my-applications

So i use this two command

set SPOTIPY_CLIENT_ID='xxxxxxxxxxxxxxxxxxxxxxx' set SPOTIPY_CLIENT_SECRET='xxxxxxxxxxxxxxxxxx'

after that i try again spotify_dl true -l https://open.spotify.com/track/xxxxxxxxxxxxxxx?si=xxxxxxxxxxxxxxx -V -m -o E:\ and i get this

"Starting spotify_dl
Setting debug mode on spotify_dl
Checking for tokens
Tokens fetched: 'xxxxxxxxxxxxxxxxxxxxxxx' 'xxxxxxxxxxxxxxxxxx'
Arguments: Namespace(url='https://open.spotify.com/track/xxxxxxxxxxxxxxx?si=xxxxxxxxxxxxxxx', output='E:\\', download=True, format_str='bestaudio/best', keep_playlist_order=False, skip_mp3=True, scrape='true', verbose=True, version=False)
Got item type track and item_id xxxxxxxxxxxxxxx?si=xxxxxxxxxxxxxxx
Traceback (most recent call last):
File "c:\users\andre\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
               return _run_code(code, main_globals, None,
File "c:\users\andre\appdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code
               exec(code, run_globals)
File "C:\Users\andre\AppData\Local\Programs\Python\Python39\Scripts\spotify_dl.exe\__main__.py", line 7, in <module>
File "c:\users\andre\appdata\local\programs\python\python39\lib\site-packages\spotify_dl\spotify_dl.py", line 80, in spotify_dl
               directory_name = get_item_name(sp, item_type, item_id)
File "c:\users\andre\appdata\local\programs\python\python39\lib\site-packages\spotify_dl\spotify.py", line 140, in get_item_name
               name = sp.track(track_id=item_id).get('name')
File "c:\users\andre\appdata\local\programs\python\python39\lib\site-packages\spotipy\client.py", line 338, in track
               return self._get("tracks/" + trid)
File "c:\users\andre\appdata\local\programs\python\python39\lib\site-packages\spotipy\client.py", line 291, in _get
               return self._internal_call("GET", url, payload, kwargs)
File "c:\users\andre\appdata\local\programs\python\python39\lib\site-packages\spotipy\client.py", line 221, in _internal_call
              headers = self._auth_headers()
File "c:\users\andre\appdata\local\programs\python\python39\lib\site-packages\spotipy\client.py", line 212, in _auth_headers
              token = self.auth_manager.get_access_token(as_dict=False)
File "c:\users\andre\appdata\local\programs\python\python39\lib\site-packages\spotipy\oauth2.py", line 186, in get_access_token
              token_info = self._request_access_token()
File "c:\users\andre\appdata\local\programs\python\python39\lib\site-packages\spotipy\oauth2.py", line 209, in _request_access_token
              raise SpotifyOauthError(
spotipy.oauth2.SpotifyOauthError: error: invalid_client, error_description: Invalid client
Sentry is attempting to send 0 pending error messages
Waiting up to 2 seconds
Press Ctrl-Break to quit"

Spotify_dl version = 7.0.6 Spotipy version = 2.16.1 Python version = 3.9.5 OS = Windows 10

Can somebody help me out, i have been trying every possible fix for a day, still no luck on it🤣🤣🤣

SathyaBhat commented 3 years ago

spotipy.oauth2.SpotifyOauthError: error: invalid_client, error_description: Invalid client this means the client id and secret that you have configured in Spotify developer console doesn't match the values that you set.