Skip to content

A feature-rich command-line audio/video downloader

[utils] Catch strange Windows errors (Closes #4733)

Philipp Hagemeisteraa42e87340e4
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 4be3239268..463cc20ff7 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -863,6 +863,9 @@ def _windows_write_string(s, out):
except AttributeError:
# If the output stream doesn't have a fileno, it's virtual
return False
+ except io.UnsupportedOperation:
+ # Some strange Windows pseudo files?
+ return False
if fileno not in WIN_OUTPUT_IDS:
return False