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.8k stars 1.62k forks source link

Spotdl failing to tag songs, saying that the files don't exist #1450

Closed mewtek closed 2 years ago

mewtek commented 2 years ago

System OS

Linux

Python Version

3.9 (CPython)

Install Source

pip / PyPi

Install version / commit hash

v3.9.2

Expected Behavior vs Actual Behavior

What should happen: The tags should be applied to the songs as normal and the metadata should be properly applied

What Happens: The tags don't get applied, and the downloads error out.

Steps to reproduce

  1. Start a spotdl download
  2. Let it download, and let it get to the tagging stage
  3. Watch as the errors roll in

Traceback

Error: [Errno 2] No such file or directory: 'The Black Angels/Phosgene Nightmare/At Night'      While Error Tagging: The Black Angels - At Night
 Traceback (most recent call last):
  File "/home/mewtek/.local/lib/python3.10/site-packages/spotdl/download/downloader.py", line 242, in download_song
    converted_file_path.unlink()
  File "/usr/lib/python3.10/pathlib.py", line 1204, in unlink
    self._accessor.unlink(self)
FileNotFoundError: [Errno 2] No such file or directory: 'The Black Angels/Phosgene Nightmare/At Night'

ffmpeg returned an error (1)
ffmpeg arguments: "-i /home/mewtek/Boobs/media-archive/music/albums/spotdl-temp/0ZX9YXy6cqE.webm -codec:a libmp3lame -abr true -q:a 0 -v debug 
/home/mewtek/Boobs/media-archive/music/albums/The Black Angels/Phosgene Nightmare/The Boat Song"
ffmpeg gave this output:
=====
b"ffmpeg version n4.4.1 Copyright (c) 2000-2021 the FFmpeg developers\n  built with gcc 11.1.0 (GCC)\n  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping 
--enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass 
--enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug 
--enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr 
--enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx 
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-shared --enable-version3\n  
libavutil      56. 70.100 / 56. 70.100\n  libavcodec     58.134.100 / 58.134.100\n  libavformat    58. 76.100 / 58. 76.100\n  libavdevice    58. 13.100 / 58. 13.100\n  libavfilter     
7.110.100 /  7.110.100\n  libswscale      5.  9.100 /  5.  9.100\n  libswresample   3.  9.100 /  3.  9.100\n  libpostproc    55.  9.100 / 55.  9.100\nSplitting the commandline.\nReading 
option '-i' ... matched as input url with argument '/home/mewtek/Boobs/media-archive/music/albums/spotdl-temp/0ZX9YXy6cqE.webm'.\nReading option '-codec:a' ... matched as option 'codec' 
(codec name) with argument 'libmp3lame'.\nReading option '-abr' ... matched as AVOption 'abr' with argument 'true'.\nReading option '-q:a' ... matched as option 'q' (use fixed quality 
scale (VBR)) with argument '0'.\nReading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.\nReading option 
'/home/mewtek/Boobs/media-archive/music/albums/The Black Angels/Phosgene Nightmare/The Boat Song' ... matched as output url.\nFinished splitting the commandline.\nParsing a group of 
options: global .\nApplying option v (set logging level) with argument debug.\nSuccessfully parsed a group of options.\nParsing a group of options: input url 
/home/mewtek/Boobs/media-archive/music/albums/spotdl-temp/0ZX9YXy6cqE.webm.\nSuccessfully parsed a group of options.\nOpening an input file: 
/home/mewtek/Boobs/media-archive/music/albums/spotdl-temp/0ZX9YXy6cqE.webm.\n[NULL @ 0x561a717191c0] Opening '/home/mewtek/Boobs/media-archive/music/albums/spotdl-temp/0ZX9YXy6cqE.webm' 
for reading\n[file @ 0x561a71719e40] Setting default whitelist 'file,crypto,data'\n[matroska,webm @ 0x561a717191c0] Format matroska,webm probed with size=2048 and score=100\nst:0 removing
common factor 1000000 from timebase\n[matroska,webm @ 0x561a717191c0] Before avformat_find_stream_info() pos: 855 bytes read:32768 seeks:0 nb_streams:1\n[opus @ 0x561a7171d840] skip 
312/960 samples\n[matroska,webm @ 0x561a717191c0] All info found\n[matroska,webm @ 0x561a717191c0] After avformat_find_stream_info() pos: 870 bytes read:32768 seeks:0 frames:1\nInput #0, 
matroska,webm, from '/home/mewtek/Boobs/media-archive/music/albums/spotdl-temp/0ZX9YXy6cqE.webm':\n  Metadata:\n    encoder         : google/video-file\n  Duration: 00:05:44.42, start: 
-0.007000, bitrate: 135 kb/s\n  Stream #0:0(eng), 1, 1/1000: Audio: opus, 48000 Hz, stereo, fltp, delay 312 (default)\nSuccessfully opened the file.\nParsing a group of options: output 
url /home/mewtek/Boobs/media-archive/music/albums/The Black Angels/Phosgene Nightmare/The Boat Song.\nApplying option codec:a (codec name) with argument libmp3lame.\nApplying option q:a 
(use fixed quality scale (VBR)) with argument 0.\nSuccessfully parsed a group of options.\nOpening an output file: /home/mewtek/Boobs/media-archive/music/albums/The Black Angels/Phosgene 
Nightmare/The Boat Song.\n[NULL @ 0x561a71721240] Unable to find a suitable output format for '/home/mewtek/Boobs/media-archive/music/albums/The Black Angels/Phosgene Nightmare/The Boat 
Song'\n/home/mewtek/Boobs/media-archive/music/albums/The Black Angels/Phosgene Nightmare/The Boat Song: Invalid argument\n[AVIOContext @ 0x561a71722240] Statistics: 32768 bytes read, 0 
seeks\n"
=====

Other details

Since my python version isn't listed, I should probably mention that I'm using python 3.10.

xnetcat commented 2 years ago

You've probably used --path-template and forgot to add {ext} at the end. That's why ffmpeg failed to convert file.

This will be more intuitive in v4.

mewtek commented 2 years ago

You've probably used --path-template and forgot to add {ext} at the end. That's why ffmpeg failed to convert file.

This will be more intuitive in v4.

Oh. Yeah, this was the issue, lmao. Thanks!