Open The-Spartan opened 10 months ago
It's clearly a spotify problem, check your credentials
It is a spotify issue, however the credentials are correct. I am using credentials that worked less than a week ago, remade the application in the dev platform, rotated the secret and even tried another spotify account dev app. All give the same issue.
It is clear that this is the cause of the issue:
``Traceback (most recent call last): File "C:\Users\Chris\AppData\Local\Programs\Python\Python310\lib\site-packages\spotipy\oauth2.py", line 588, in refresh_access_token response.raise_for_status() File "C:\Users\Chris\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://accounts.spotify.com/api/token```
Trying on another device entirely (installing on laptop) it works fine with the same settings. What would be a culprit for it failing on the PC? i have tried fully uninstalling and reinstalling spotify_to_ytmusic etc on the PC to no avail.
Thanks for the app and your help
Found a way to consistently reproduce the issue:
reinstalling spotipy, spotify_to_ytmusic etc does not work. Do you happen to know if there is some weird caching going on?
Thanks
I ran into the same issue, looking at the code I did find some cache related code.
Fixed the issue by removing the ~/.cache/spotify_to_ytmusic
directory and running the setup process again.
Hope that helps ✌️
Hi, this is a very tricky issue, according to the developer forum here: https://community.spotify.com/t5/Spotify-for-Developers/INVALID-CLIENT-Invalid-redirect-URI/td-p/5228936
to resolve the redirect URI issue, you'll need to add http://localhost
in your sportify dashboard settings in Redirect URIs
section, by default it's only https://open.spotify.com/
, which does not apply to our case
@sigma67 I would suggest adding this in README
It's literally right there in the README
can confirm this happens when trying to setup a second account. first account works fine but the second account throws this error even though the creds are correct. trying to locate the default cache location on macos to delete the file as @bchangip suggested above. @sigma67 mind having a second look ?
EDIT : confirmed the solution for mac is deleting
/System/Volumes/Data/Users/----YOUR-USERNAME-----/Library/Caches/spotify_to_ytmusic/spotipy.cache
@mfractal thanks for providing actual reproduction instructions
Installed via pip install spotify_to_ytmusic, command is
spotify_to_ytmusic all [user]
spotify_to_ytmusic setup
works flawlessly. Running ytmusicapi 1,4,1m changing to 1.4.0 does not alleviate the issueClient ID and secrets are correct as have re-entered them with re-rolled creds.
any ideas?