From 2a59336effd2192381ba42e3e1fd59ae7169c998 Mon Sep 17 00:00:00 2001 From: coletdjnz Date: Sun, 22 Jun 2025 10:19:27 +1200 Subject: [PATCH] Remove callables when writing --write-info-json --- yt_dlp/YoutubeDL.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 309489672..903fd2b87 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -3697,6 +3697,8 @@ def filter_fn(obj): return list(map(filter_fn, obj)) elif obj is None or isinstance(obj, (str, int, float, bool)): return obj + elif callable(obj): + return None else: return repr(obj)