yt-dlp: The fields playlist and playlist_id are missing in exec command

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I remove or skip any mandatory* field

Checklist

  • I’m reporting a bug unrelated to a specific site
  • I’ve verified that I’m running yt-dlp version 2022.11.11 (update instructions) or later (specify commit)
  • I’ve checked that all provided URLs are playable in a browser with the same IP and same login details
  • I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
  • I’ve searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
  • I’ve read the guidelines for opening an issue

Provide a description that is worded well enough to be understood

I try to download all videos from the Youtube playlist https://www.youtube.com/playlist?list=PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB including the metadata of the playlist with the --dump-single-json command in the exec part of my .conf file. The playlist metadata should be saved in the same location, as the videos of the playlist. I’m using the output filename template --output "/downloads/%(channel)s/%(playlist)s [youtube-%(playlist_id)s]/%(title)s [youtube-%(id)s].%(ext)s" for the videos.

The videos of the playlist get downloaded successfully. They are stored in /downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/....

The playlist metadata cannot be stored in this directory because the fields %(playlist)s and %(playlist_id)s are not set in the exec part. Hence yt-dlp is trying to save the metadata to /downloads/Sew with Sally/NA [youtube-NA]/Playlist.info.json, which does not exist.

This is my yt-dlp.conf file (I had to add .txt as extension for uploading it to github): yt-dlp.conf.txt

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

bash-5.1# yt-dlp -vU https://www.youtube.com/playlist?list=PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB
[debug] Command-line config: ['-vU', 'https://www.youtube.com/playlist?list=PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB']
[debug] Home config "yt-dlp.conf": ['--exec', 'playlist:yt-dlp --ignore-config --restrict-filenames --dump-single-json %(original_url)s > "/downloads/%(channel)s/%(playlist)s [youtube-%(playlist_id)s]/Playlist.info.json"', '--restrict-filenames', '--no-simulate', '--extractor-args', 'innertube_key:XXXXXXXXXX', '--write-info-json', '--embed-metadata', '--write-thumbnail', '--embed-thumbnail', '--convert-thumbnails', 'jpg', '--format', 'bestvideo*[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4] / bestvideo*+bestaudio/best', '--output', '/downloads/%(channel)s/%(playlist)s [youtube-%(playlist_id)s]/%(title)s [youtube-%(id)s].%(ext)s', '--write-subs', '--sub-format', 'srt/best', '--convert-subs', 'srt', '--sub-langs', 'en', '--ignore-config']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.11.11 [8b64402] (pip)
[debug] Python 3.11.0 (CPython x86_64 64bit) - Linux-3.10.108-x86_64-with (OpenSSL 1.1.1s  1 Nov 2022)
[debug] exe versions: ffmpeg 5.0.1 (setts), ffprobe 5.0.1
[debug] Optional libraries: Cryptodome-3.16.0, brotli-1.0.9, certifi-2022.09.24, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1723 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.11.11, Current version: 2022.11.11
yt-dlp is up to date (2022.11.11)
[debug] [youtube:tab] Extracting URL: https://www.youtube.com/playlist?list=PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB
[youtube:tab] PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB: Downloading webpage
[youtube:tab] PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB: Redownloading playlist API JSON with unavailable videos
[download] Downloading playlist: How to Make a Skirt Sloper
[info] Writing playlist metadata as JSON to: /downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB].info.json
[info] Downloading playlist thumbnail 3 ...
[info] Writing playlist thumbnail 3 to: /downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB].jpg
[youtube:tab] Playlist How to Make a Skirt Sloper: Downloading 7 videos of 7
[debug] The information of all playlist entries will be held in memory
[download] Downloading video 1 of 7
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=QwygNlqZRnA
[youtube] QwygNlqZRnA: Downloading webpage
[youtube] QwygNlqZRnA: Downloading android player API JSON
[youtube] QwygNlqZRnA: Downloading MPD manifest
[youtube] QwygNlqZRnA: Downloading MPD manifest
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[info] QwygNlqZRnA: Downloading subtitles: en
[info] QwygNlqZRnA: Downloading 1 format(s): 137+140
[info] Writing video subtitles to: /downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper_Pt1_Sew_with_Sally [youtube-QwygNlqZRnA].en.vtt
[debug] Invoking http downloader on "https://www.youtube.com/api/timedtext?v=QwygNlqZRnA&caps=asr&xoaf=5&hl=en&ip=0.0.0.0&ipbits=0&expire=1670784130&sparams=ip%2Cipbits%2Cexpire%2Cv%2Ccaps%2Cxoaf&signature=ABDBA130921A0CD23E7005544A38DF1AD8B77DF8.E937293F377BC23B4AF2B211A59D5484A8403F65&key=yt8&lang=en&fmt=vtt"
[download] Destination: /downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper_Pt1_Sew_with_Sally [youtube-QwygNlqZRnA].en.vtt
[download] 100% of   11.34KiB in 00:00:00 at 52.72KiB/s
[info] Downloading video thumbnail 41 ...
[info] Writing video thumbnail 41 to: /downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper_Pt1_Sew_with_Sally [youtube-QwygNlqZRnA].webp
[info] Writing video metadata as JSON to: /downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper_Pt1_Sew_with_Sally [youtube-QwygNlqZRnA].info.json
[SubtitlesConvertor] Converting subtitles
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:/downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper_Pt1_Sew_with_Sally [youtube-QwygNlqZRnA].en.vtt' -f srt -movflags +faststart 'file:/downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper_Pt1_Sew_with_Sally [youtube-QwygNlqZRnA].en.srt'
Deleting original file /downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper_Pt1_Sew_with_Sally [youtube-QwygNlqZRnA].en.vtt (pass -k to keep)
[ThumbnailsConvertor] Converting thumbnail "/downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper_Pt1_Sew_with_Sally [youtube-QwygNlqZRnA].webp" to jpg
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -f image2 -pattern_type none -i 'file:/downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper_Pt1_Sew_with_Sally [youtube-QwygNlqZRnA].webp' -update 1 -bsf:v mjpeg2jpeg -movflags +faststart 'file:/downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper_Pt1_Sew_with_Sally [youtube-QwygNlqZRnA].jpg'
Deleting original file /downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper_Pt1_Sew_with_Sally [youtube-QwygNlqZRnA].webp (pass -k to keep)
[debug] Invoking http downloader on "https://rr1---sn-h0jeenld.googlevideo.com/videoplayback?expire=1670780531&ei=EsKVY7y4O96mgQefwruwDQ&ip=37.49.7.125&id=o-ACmDcy0zxlaDv69nnx-Q8Z2dXSrZPLasmpV04mvmyYC0&itag=137&source=youtube&requiressl=yes&mh=-u&mm=31%2C29&mn=sn-h0jeenld%2Csn-h0jelnez&ms=au%2Crdu&mv=m&mvi=1&pl=22&initcwndbps=2151250&spc=SFxXNk9YRXJKLPRTe2Bgv6Z4AQ8KHoE&vprv=1&svpuc=1&mime=video%2Fmp4&gir=yes&clen=169068599&otfp=1&dur=891.223&lmt=1668395884294754&mt=1670758635&fvip=1&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=6216224&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cotfp%2Cdur%2Clmt&sig=AOq0QJ8wRQIgSrBTRmt2lH8-0TV8aLttpY5z8cjVLa2jjIOmSXeYyCsCIQDH_E6VRHyvrOpHViWtWar1kb9DbBVZyr25l4dpcAlqaA%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAPeWrvjJeo54aojR9nWWg5qhD4TdXjlqMI6nw1e4X71RAiBWH6ApOkczy9YJ0nRfOTtvoEdZX03qR4kRWD83_pnaXQ%3D%3D"
[download] Destination: /downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper_Pt1_Sew_with_Sally [youtube-QwygNlqZRnA].f137.mp4
[download] 100% of  161.24MiB in 00:00:10 at 15.16MiB/s
[debug] Invoking http downloader on "https://rr1---sn-h0jeenld.googlevideo.com/videoplayback?expire=1670780531&ei=EsKVY7y4O96mgQefwruwDQ&ip=37.49.7.125&id=o-ACmDcy0zxlaDv69nnx-Q8Z2dXSrZPLasmpV04mvmyYC0&itag=140&source=youtube&requiressl=yes&mh=-u&mm=31%2C29&mn=sn-h0jeenld%2Csn-h0jelnez&ms=au%2Crdu&mv=m&mvi=1&pl=22&initcwndbps=2151250&spc=SFxXNk9YRXJKLPRTe2Bgv6Z4AQ8KHoE&vprv=1&svpuc=1&mime=audio%2Fmp4&gir=yes&clen=14425411&otfp=1&dur=891.297&lmt=1668395742360523&mt=1670758635&fvip=1&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=6211224&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cotfp%2Cdur%2Clmt&sig=AOq0QJ8wRAIgDO3oVMmRR8RtH7RISrk9HHj7tsD0FdUZhf456Jdvc6YCIGoGbpOfQZsIGIWkMYjjuuVBFGcX1p6yzCi0SxAkRJVA&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAPeWrvjJeo54aojR9nWWg5qhD4TdXjlqMI6nw1e4X71RAiBWH6ApOkczy9YJ0nRfOTtvoEdZX03qR4kRWD83_pnaXQ%3D%3D"
[download] Destination: /downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper_Pt1_Sew_with_Sally [youtube-QwygNlqZRnA].f140.m4a
[download] 100% of   13.76MiB in 00:00:01 at 13.08MiB/s
[Merger] Merging formats into "/downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper_Pt1_Sew_with_Sally [youtube-QwygNlqZRnA].mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:/downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper_Pt1_Sew_with_Sally [youtube-QwygNlqZRnA].f137.mp4' -i 'file:/downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper_Pt1_Sew_with_Sally [youtube-QwygNlqZRnA].f140.m4a' -c copy -map 0:v:0 -map 1:a:0 -movflags +faststart 'file:/downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper_Pt1_Sew_with_Sally [youtube-QwygNlqZRnA].temp.mp4'
Deleting original file /downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper_Pt1_Sew_with_Sally [youtube-QwygNlqZRnA].f140.m4a (pass -k to keep)
Deleting original file /downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper_Pt1_Sew_with_Sally [youtube-QwygNlqZRnA].f137.mp4 (pass -k to keep)
[Metadata] Adding metadata to "/downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper_Pt1_Sew_with_Sally [youtube-QwygNlqZRnA].mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:/downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper_Pt1_Sew_with_Sally [youtube-QwygNlqZRnA].mp4' -map 0 -dn -ignore_unknown -c copy -write_id3v1 1 -metadata 'title=How to Make a Skirt Sloper Pt1 | Sew with Sally' -metadata date=20221115 -metadata 'description=Learn custom pattern making for a skirt. Sally teaches step-by-step how to make a skirt sloper, which can be used to create custom fit sewing patterns from scratch. 
First make the skirt sloper, use it to make an oak tag pattern, then use the oak tag pattern to create pattern patterns for sewing.


Learn how to sew. Sew with Sally simplifies sewing with sewing lessons for fine, custom and couture clothing. It'"'"'s simpler than it seams!

All rights reserved, copyright 2022' -metadata 'synopsis=Learn custom pattern making for a skirt. Sally teaches step-by-step how to make a skirt sloper, which can be used to create custom fit sewing patterns from scratch. 
First make the skirt sloper, use it to make an oak tag pattern, then use the oak tag pattern to create pattern patterns for sewing.


Learn how to sew. Sew with Sally simplifies sewing with sewing lessons for fine, custom and couture clothing. It'"'"'s simpler than it seams!

All rights reserved, copyright 2022' -metadata 'purl=https://www.youtube.com/watch?v=QwygNlqZRnA' -metadata 'comment=https://www.youtube.com/watch?v=QwygNlqZRnA' -metadata 'artist=Sew with Sally' -movflags +faststart 'file:/downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper_Pt1_Sew_with_Sally [youtube-QwygNlqZRnA].temp.mp4'
[EmbedThumbnail] mutagen: Adding thumbnail to "/downloads/Sew_with_Sally/How_to_Make_a_Skirt_Sloper [youtube-PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB]/How_to_Make_a_Skirt_Sloper_Pt1_Sew_with_Sally [youtube-QwygNlqZRnA].mp4"
[download] Downloading video 2 of 7
...
[download] Downloading video 3 of 7
...
[download] Downloading video 4 of 7
...
[download] Downloading video 5 of 7
...
[download] Downloading video 6 of 7
...
[download] Downloading video 7 of 7
...
[Exec] Executing command: yt-dlp --ignore-config --restrict-filenames --dump-single-json https://www.youtube.com/playlist?list=PLtgLx2K6W8-BX52Iyqi37udoGk33Z2GJB > "/downloads/Sew with Sally/NA [youtube-NA]/Playlist.info.json"
/bin/sh: can't create /downloads/Sew with Sally/NA [youtube-NA]/Playlist.info.json: nonexistent directory
ERROR: Command returned error code 1
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1485, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1582, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1711, in process_ie_result
    return self.__process_playlist(ie_result, download)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1879, in __process_playlist
    ie_result = self.run_all_pps('playlist', ie_result)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 3435, in run_all_pps
    info = self.run_pp(pp, info)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 3414, in run_pp
    files_to_delete, infodict = pp.run(infodict)
                                ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/yt_dlp/postprocessor/common.py", line 24, in run
    ret = func(self, info, *args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/yt_dlp/postprocessor/exec.py", line 33, in run
    raise PostProcessingError('Command returned error code %d' % retCode)
yt_dlp.utils.PostProcessingError: Command returned error code 1

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (7 by maintainers)

Commits related to this issue

Most upvoted comments

or could replace “private” with “internal data” since the word “private” seems to be the source of confusion