Cant log into spotify
Opened this issue ยท 23 comments
Whenever i try to back up spotify playlists I get this error:
Couldn't load URL: https://api.spotify.com/v1/users/31mi3a3zbifnm43rqkfy36snxhp4/tracks?limit=50 (HTTP Error 404: Not Found)
Trying again...
I think I may have logged into the wrong account but I found no way to log out to fix it.
Yeah I'm facing the exact same problem, did u find a way to solve it?
Same. But in my case the URL has my actual username. Not sure why yours has that long string after /v1/users/
Seems like changing this file:
spotify2ytmusic/spotify_backup.py
Change all occurrences of users/{user_id}
to me
(so it should be e.g. me/tracks
).
Seems to work. Spotify had API changes recently. @Viquetti1 @R4nd0mDude
I think I may have logged into the wrong account but I found no way to log out to fix it.
If this is still a problem, you can probably just delete the oauth.json
in the working directory.
Seems like changing this file:
spotify2ytmusic/spotify_backup.py
Change all occurrences of
users/{user_id}
tome
(so it should be e.g.me/tracks
).Seems to work. Spotify had API changes recently. @Viquetti1 @R4nd0mDude
Still not working,
With the changes u said, the code looks like this, but the problem still the same
Seems like changing this file:
spotify2ytmusic/spotify_backup.py
Change all occurrences ofusers/{user_id}
tome
(so it should be e.g.me/tracks
).
Seems to work. Spotify had API changes recently. @Viquetti1 @R4nd0mDudeStill not working,
With the changes u said, the code looks like this, but the problem still the same
Well, after I run the spotify file again without the gui, the code worked without any problem, and then I could use the gui normally, now I'm copying a playlist with 900 songs, seems great overall. Thank you for the reply and thanks to the dev!
Hi there. I am having the same issue. Is someone able to write the specific dummy steps to fix this issue? I'm not well versed in this kind of stuff at all, so reading this thread didn't super help. But I would like to get this fixed. Thank you.
@levelstory1 -- There should be a file in your working folder called spotify_backup.py
(or it might be in a subfolder called spotify2ytmusic
). Open that file in a text editor, and modify lines 156 and 165 like this.
That is what fixed it for me.
e-volusian thank you for your reply!
I'm sorry to ask more questions, but I think my bigger issue is that I can't find the file you are referencing (or a folder location) anywhere on my PC. Do you have any idea where it would be? I know that is asking a lot considering you don't have access to my files, but I don't even know where to begin to look to find this file and doing a search for "spotify_backup.py" on my PC yields zero results. I'm not sure if you would know a way to search for this file beyond the basic search in file explorer, or key words I could search that would help me find the file (on the off chance it is hidden??). To be honest, I don't remember even establishing a working folder when installing this. It was very confusing to me and even looking back at the instructions I followed feels very foreign. I'm very new to github, so I'd never done any of this before using Spotify2ytmusic.
If it helps, I followed instructions to install from this reddit thread (https://www.reddit.com/r/YoutubeMusic/comments/1193llv/transfer_spotify_to_youtube_music_playlist/), specifically from user CozyGalaxies.
Okay, it looks like you're probably using the gui (the graphical interface) which didn't work for me so I was following the command line instructions. For the gui on windows, I'm not sure how to fix it because I think that uses some .exe
files which I assume would have to be recompiled.
But if you really want to keep at it, I would recommend trying the command-line instrx from the link I put above.
e-volusian Okay, I will give that a shot! Thank you for taking the time to help me! I appreciate it.
Seems like changing this file:
spotify2ytmusic/spotify_backup.py
Change all occurrences of
users/{user_id}
tome
(so it should be e.g.me/tracks
).Seems to work. Spotify had API changes recently. @Viquetti1 @R4nd0mDude
Can confirm that this fix works, but only if you're running the program from the source, using the command line python -m spotify2ytmusic gui
I fought this for a few minutes this morning. Do not download the MSI under "Releases", download the ZIP instead
Go to where you decompressed the ZIP and run this:
cd spotify_to_ytmusic
pip install ytmusicapi
pip install tk # If using the GUI
From there, find spotify_backup.py and edit lines 156 and 165 to replace "users/{user_id}" with "me", as shown in the images earlier in this post.
Then run the GUI using
python3 -m spotify2ytmusic gui
I opened the following PR that should fix this issue long term
e-volusian thank you for your reply!
I'm sorry to ask more questions, but I think my bigger issue is that I can't find the file you are referencing (or a folder location) anywhere on my PC. Do you have any idea where it would be? I know that is asking a lot considering you don't have access to my files, but I don't even know where to begin to look to find this file and doing a search for "spotify_backup.py" on my PC yields zero results. I'm not sure if you would know a way to search for this file beyond the basic search in file explorer, or key words I could search that would help me find the file (on the off chance it is hidden??). To be honest, I don't remember even establishing a working folder when installing this. It was very confusing to me and even looking back at the instructions I followed feels very foreign. I'm very new to github, so I'd never done any of this before using Spotify2ytmusic.
If it helps, I followed instructions to install from this reddit thread (https://www.reddit.com/r/YoutubeMusic/comments/1193llv/transfer_spotify_to_youtube_music_playlist/), specifically from user CozyGalaxies.
Hi, not sure if you still need this. You can open your cmd then key in :
dir /s spotify_backup.py
This will show you the directory where your python file for this spotify_backup.py is stored, copy the address and paste it in files. Afterwards it will show you the spotify_backup.py file, right click and open into any text editor and change the users accordingly. It works fine for me.
e-volusian thank you for your reply!
I'm sorry to ask more questions, but I think my bigger issue is that I can't find the file you are referencing (or a folder location) anywhere on my PC. Do you have any idea where it would be? I know that is asking a lot considering you don't have access to my files, but I don't even know where to begin to look to find this file and doing a search for "spotify_backup.py" on my PC yields zero results. I'm not sure if you would know a way to search for this file beyond the basic search in file explorer, or key words I could search that would help me find the file (on the off chance it is hidden??). To be honest, I don't remember even establishing a working folder when installing this. It was very confusing to me and even looking back at the instructions I followed feels very foreign. I'm very new to github, so I'd never done any of this before using Spotify2ytmusic.
If it helps, I followed instructions to install from this reddit thread (https://www.reddit.com/r/YoutubeMusic/comments/1193llv/transfer_spotify_to_youtube_music_playlist/), specifically from user CozyGalaxies.Hi, not sure if you still need this. You can open your cmd then key in :
dir /s spotify_backup.py
This will show you the directory where your python file for this spotify_backup.py is stored, copy the address and paste it in files. Afterwards it will show you the spotify_backup.py file, right click and open into any text editor and change the users accordingly. It works fine for me.
Thank you so much for this! I will definitely give it a try, and will let you know how it goes. :)
e-volusian thank you for your reply!
I'm sorry to ask more questions, but I think my bigger issue is that I can't find the file you are referencing (or a folder location) anywhere on my PC. Do you have any idea where it would be? I know that is asking a lot considering you don't have access to my files, but I don't even know where to begin to look to find this file and doing a search for "spotify_backup.py" on my PC yields zero results. I'm not sure if you would know a way to search for this file beyond the basic search in file explorer, or key words I could search that would help me find the file (on the off chance it is hidden??). To be honest, I don't remember even establishing a working folder when installing this. It was very confusing to me and even looking back at the instructions I followed feels very foreign. I'm very new to github, so I'd never done any of this before using Spotify2ytmusic.
If it helps, I followed instructions to install from this reddit thread (https://www.reddit.com/r/YoutubeMusic/comments/1193llv/transfer_spotify_to_youtube_music_playlist/), specifically from user CozyGalaxies.Hi, not sure if you still need this. You can open your cmd then key in :
dir /s spotify_backup.py
This will show you the directory where your python file for this spotify_backup.py is stored, copy the address and paste it in files. Afterwards it will show you the spotify_backup.py file, right click and open into any text editor and change the users accordingly. It works fine for me.Thank you so much for this! I will definitely give it a try, and will let you know how it goes. :)
In case you haven't figured it out. When running the line by line (command line) in the part that says "Download backup" it opens a tab with text. Copy that and paste it in Notepad, save it as spotify-backup.py save it in the same place wherever you saved Python, which is probably users folder. Then keep running the instructions
@e-volusian @Drayx099 Thank you both for your help! Finally got around to fixing it and it is back to working smoothly. :)
can someone help me here? I tried changing the text to me/tracks and me/playlists but when I run it outside of the gui, the entire window just closes. I found that before it closes, it says "PermissionError: (errno 13) permission denied: 'playlists.json" I tried going back to the gui and I was still met with the error. I dont know anything about coding so im not sure if the window closing is normal or not but someone please help me.
Seems like changing this file:
spotify2ytmusic/spotify_backup.py
Change all occurrences of
users/{user_id}
tome
(so it should be e.g.me/tracks
).Seems to work. Spotify had API changes recently. @Viquetti1 @R4nd0mDude
I want to add here that using
worked for me.
@e-volusian
Hey! I'm sorry but total noob here, lol. Your comments helped me the most so far so I'd like to ask you something if you're willing to answer. I cannot generate the playlists.json file, everytime i try it gives me this error which I assume means it's either in the wrong location or doesn't have access to the right path. I tried moving things around a bit but no luck. The spotify_backup.py file works just fine outside the gui as well but it gives me the 404 error if I try listing my playlists. Any tips? All help is welcome! Thank you in advance!
@yuriichile -- did you get it figured out? I think the file should be named spotify_backup.py
. Notice the underscore _
; in your command it looks like you are using a dash -
.
@e-volusian ...it was indeed a dash. tho the gui still won't work I managed do it throught the command line like you suggested in another reply. I simply copy pasted the command on the instructions without double checking it, that was my bad. I apologize for the inconvenience, thank you for your time!!