-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No such file or dir after downloading some songs #162
Comments
Also having this issue, and you can't run as sudo because of the enviroment variables. Comment me if someone finds a fix. |
One fix would be to allow us to pass our spotify or youtube tokens as arguments, I will attempt to make a fork later for that. |
FYI im setting envs in rc file |
@TobiWtf you can pass process specfiic env variables.
also what's the reason to use |
Oh my bad, im still decently new to the linux ecosystem. So, essentially, i am also getting an error occasionally where it will say the same thing as that guy, i can send a full log in a bit, so i was wondering if running with admin perms would allow it to write to the file anyways. Also as an unrelated side note, the files should have some formatting, the reason i say this is because at the moment, i downloaded some AC/DC songs and the / messed with the file path. |
The issue seems to be that there is no file, and its being opened to read. A work around I found is editing these 2 lines to the following, as well as adding a line before it: mp3_file = path.join(download_directory, f"{song.get('artist')} - {song.get('name')}.mp3")
if not skip_mp3 and path.isfile(mp3_file):
song_file = MP3(mp3_file, ID3=EasyID3) This fix doesn't actually fix the one song that failed. It just prevents the script from halting in its tracks, and continues. mp3_file = path.join(download_directory, f"{song.get('artist')} - {song.get('name')}.mp3")
if not path.isfile(mp3_file):
with open('some_error_log.txt', 'a') as log:
log.write(f"Error in downloading {song.get('artist')} - {song.get('name')}\n")
continue
if not skip_mp3:
song_file = MP3(mp3_file, ID3=EasyID3) |
Interesting work around, I wonder why it's failing. This seems like it may be an issue with the youtube parser, rather than spotify. Let me take a look. |
Took a look. Seems like this is a |
Maybe try re-querying the youtube if the song fails, and restarting the process for said song? Will try to see later. |
i tried re-running several times but doesn't work |
The error is not from Youtube-dl but rather from Mutagen which is used to write back the metadata to the file
probably some mismatch between how mutagen sanitizes the filename vs how the script saves it |
I was experiencing this issue and it seems to be fixed in #152 providing you still install using pip and replace youtube.py and utils.py with the latest versions from the repository this will resolve the issue |
this is released with 7.6 release #174. please update and try it out, if not open a new issue |
Describe the bug
No such file or dir after downloading around 55 songs
To Reproduce
spotify_dl -V -l https://open.spotify.com/playlist/2EM05rztV3ptTwObSOM9o7\?si\=N6aoBBbTQoeaf2n350_3RA\&nd\=1 -o .
Expected behavior
it should continue to download music
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: