Closed Hypocee closed 2 years ago
Sounds like a your environment kind of issue. I've tested it in a virtual machine but could not replicate your issues that you seem to be having.
Very well. Thanks for the work attempting to replicate.
I'm re-opening this.
Looking into it with a duplicate issue, I think I found the issue. Do you change the youtube-dl fork
when you select the youtube-dl executable? They have to match, as the application extracts application information from the executable.
Because the issue you're having is relating to using the yt-dlp
fork (the default fork used), the substring issue seems to be occurring. If you use youtube-dl
and not yt-dlp
, try selecting youtube-dl
as the fork in the download options under the updating tab.
You found the problem. I don't like auto-updates in general because I like to minimize the possible reasons things suddenly break, so I didn't care about or set the option which is presented as controlling an auto-updating behavior.
If the fork in the Updating tab is set to match that of the TYDL executable, YT-DL-GUI 3.1.1 will correctly remember a static path, or fill in the default name of the executable from that fork. It will then correctly download from URLs using that executable. (Reasonably enough the fork option must be set in linear time before specifying a path, or the path will be discarded; it's not enough for them to be set in the same settings "session". The options are presumably written and read upon changing pages within settings.)
Good thinking and thanks again, both for making this wonderful tool and for helping me fix my error.
I attempted to manually upgrade from 2.3.2 to 3.1.1 . Upon encountering this issue I tried going backward a few versions, then started going forward from 2.3.2 . At every attempt I deleted settings.ini and any test yt-dl executable. All first runs properly presented first run dialog boxes. I found that 3.0.0-5 worked as expected and 3.0.0-6 displayed this error chain.
At a guess, your reprioritization of the default yt-dl fork baked in an assumption about the name of the yt-dl executable, and/or some string operation in a path read that's not compatible with Win 7 despite being .NET. String length returns a negative value, possibly an exception code being read as a value.
Affected versions run OK upon answering "yes" to the IP statement and "no" to all settings questions.
Upon entering the settings dialog, the youtube-dl path field is blank (the ffmpeg path field is populated and correct). Clicking ellipsis browse button and selecting the yt-dl exe via text prediction or double-click properly exits the browse dialog and populates the field with the correct path. Clicking Save exits the settings dialog without complaint. However, upon reeentering the settings, the field is blank again. Attempting to download while in this state gets
(In later versions the download window looks funky - partially white - while showing this error and the cancel button doesn't work while the X does. It's probably not worth trying to make that window robust against this kind of error state.)
If settings is entered and Use static youtube-dl is turned on, and a path to the yt-dl exe entered, upon clicking Save the program throws an exception window with no title, screwed up formatting and two blank tabs reading:
The application doesn't exit upon closing that dialog. It returns to the settings. Clicking Save any number of times will pop the same error again.
The yt-dl path is written into the settings.ini immediately upon clicking Save the first time, before the exception. A resulting settings.ini:
If Cancel is used to exit settings and the program is closed and asked to run again, it will display the same error window and refuse to run until settings.ini is deleted or the ytdlPath line is removed from it. Removing only the UseStaticYtdl line has no effect.
If a file named yt-dlp.exe is present upon running an affected release, even a "first" run with no settings.ini, the program will display the same error window and refuse to run.