spotDL / spotify-downloader

Download your Spotify playlists and songs along with album art and metadata (from YouTube if a match is found).
https://spotdl.readthedocs.io/en/latest/
MIT License
17.32k stars 1.6k forks source link

Change this title, poorly formatted issues will not be handled #1596

Closed fnfontana closed 2 years ago

fnfontana commented 2 years ago

System OS

Windows

Python Version

3.10 (CPython)

Install Source

pip / PyPi

Install version / commit hash

v3.9.6

Expected Behavior vs Actual Behavior

The expected behavior is just normally download the audio files without any error message.

I've sent the command to download an entire playlist, most of the songs were downloaded successfully, but some don't. Looks like the error is somewhat related to mutagen permissions.

Steps to reproduce - Ensure to include actual links!

Just run the regular command spotdl "link-to-spotify-playlist".

Traceback

Error: [Errno 13] Permission denied: 'Slick Slazenger - Lost In Time.mp3'       While Error Tagging: Slick Slazenger - Lost In
Time
 Traceback (most recent call last):
  File "C:\Users\ffont\.local\pipx\venvs\spotdl\lib\site-packages\mutagen\_util.py", line 251, in _openfile
    fileobj = open(filename, "rb+" if writable else "rb")
PermissionError: [Errno 13] Permission denied: 'Slick Slazenger - Lost In Time.mp3'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\ffont\.local\pipx\venvs\spotdl\lib\site-packages\spotdl\download\downloader.py", line 247, in download_song
    set_id3_data(
  File "C:\Users\ffont\.local\pipx\venvs\spotdl\lib\site-packages\spotdl\download\embed_metadata.py", line 301, in
set_id3_data
    function(converted_file_path, song_object)
  File "C:\Users\ffont\.local\pipx\venvs\spotdl\lib\site-packages\spotdl\download\embed_metadata.py", line 59, in _set_id3_mp3
    audio_file.save(v2_version=3)
  File "C:\Users\ffont\.local\pipx\venvs\spotdl\lib\site-packages\mutagen\_util.py", line 185, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\ffont\.local\pipx\venvs\spotdl\lib\site-packages\mutagen\_util.py", line 154, in wrapper
    with _openfile(self, filething, filename, fileobj,
  File "C:\Users\ffont\AppData\Local\Programs\Python\Python310\lib\contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "C:\Users\ffont\.local\pipx\venvs\spotdl\lib\site-packages\mutagen\_util.py", line 272, in _openfile
    raise MutagenError(e)
mutagen.MutagenError: [Errno 13] Permission denied: 'Slick Slazenger - Lost In Time.mp3'

Other details

I think it's important to say that instead of using normal pip, I have spotDL running under pipx in order to avoid conflicts with my other python dependent programs.

xnetcat commented 2 years ago

Hi this error should be fixed in v4. Try using it and let me know if it's fixed

https://github.com/spotDL/spotify-downloader#release-candidate-phase