Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Exit code 0 when actually failing #15634
Comments
Most likely you're getting error code of wrapping process not youtube-dl. |
|
I have got it working by starting youtube-dl directly as a Process and setting the WorkingDirectory first. That way i could avoid using cmd.exe and get the right exit code. -o does not work for multiple files. |
Not true. |
Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2018.02.11. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:
Add the
-vflag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):
Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
Description of your issue, suggested solution and other information
I am trying to develop an aplication with youtube-dl. When downloading a video to a very nested subfolder in order to reach the maixmum path length youtube-dl outputs the error
ERROR: unable to open for writing: [Errno 2] No such file or directory: 'South Park_December 17, 1997_1_0110_South Park 110 - Mr. Hankey, der Weihnachtskot - 1. Ak-e6039bb4-ed00-11e0-aca6-0026b9414f30.mp4.part-Frag0.part'
(Used southpark for example). The process then exits with error code 0 (success) indicating that everything went well. I have also tested this beahivour with mistyped url's (404). Checking for the exitcode is therefore not working. Also if i start youtube dl within a c# process i cant get the error output. If i redirect all output it is still visible within my console window so it seems like the error message is returned some other way.
How can i catch all errors programmaticaly when using youtube-dl and why is the exit code always 0?