Skip to content

A feature-rich command-line audio/video downloader

Fix verbose log when stdout/stderr encoding is `None`

pukkandan2a938746f3db
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py
index 23e42f7401..0aee3b1224 100644
--- a/yt_dlp/YoutubeDL.py
+++ b/yt_dlp/YoutubeDL.py
@@ -3588,7 +3588,7 @@ class YoutubeDL(object):
return
def get_encoding(stream):
- ret = getattr(stream, 'encoding', 'missing (%s)' % type(stream).__name__)
+ ret = str(getattr(stream, 'encoding', 'missing (%s)' % type(stream).__name__))
if not supports_terminal_sequences(stream):
from .compat import WINDOWS_VT_MODE
ret += ' (No VT)' if WINDOWS_VT_MODE is False else ' (No ANSI)'