-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
check-formats hang with NON-writable working directory #7894
Comments
Testing format currently requires writing a temp file. I don't know why it gets stuck instead of throwing an error though. As workaround, ask yt-dlp to write temp files to different directory |
Can it be Python bug? I was using Process Explorer to see the stack trace - it was stuck inside of Py_gitversion. Weird.... |
This is indeed likely a Python bug - an old one that is. It's an issue with tempfile where it hangs if the directory is not writeable on Windows. We have used tempfile for file --check-formats downloads into for a while, introduced by 21cd8fa python/cpython#66305 |
Would it be possible to work around this by finding out what the temp path is (what Alternatively, could a different approach be used to achieve the same functionality? Assuming nobody else has resolved the issue in their solution, that is. It may be a Python bug, but if it's been up on SO for nearly 5 years - perhaps we shouldn't expect an upstream resolution any time soon. |
I'll just leave this here, in case anybody needs a working workaround for this till it gets fixed. python/cpython#66305 (comment) |
DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
Checklist
Region
No response
Provide a description that is worded well enough to be understood
In case the working directory is NOT writable (IMPORTANT!), e.g. C:\Program Files, yt-dlp stuck when trying to just parse particular video URL (using -J parameter). Not all URLs are affected. It seems the ones with DRM.
Yt-dlp never finishes. Python process is stuck consuming 50MB of memory and 50% of CPU core.
Issue is NOT reproducible in the previous 2023.06.22 release.
Provide verbose output that clearly demonstrates the problem
yt-dlp -vU <your command line>
)'verbose': True
toYoutubeDL
params instead[debug] Command-line config
) and insert it belowComplete Verbose Output
The text was updated successfully, but these errors were encountered: