Skip to content
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

Yt-dlg Issues With Unavailable Download Folder Paths #65

Closed
6 of 9 tasks
Hooperla opened this issue Oct 20, 2021 · 2 comments
Closed
6 of 9 tasks

Yt-dlg Issues With Unavailable Download Folder Paths #65

Hooperla opened this issue Oct 20, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@Hooperla
Copy link

  • I think my problem is NOT with youtube-dlp
  • I've verified and i assure that I'm running yt-dlg 1.7.1
  • I assure that i am using the latest version of youtube-dlp
  • Searched bugtracker
  • I've read the FAQs file

What is the purpose of your issue?

  • Bug report
  • Feature request (request for a new functionality)
  • Question
  • Other

Bug report

What operating system do you use ?

Windows 10 x64

List of actions to perform to reproduce the problem:

  1. Open yt-dlg
  2. Set the download folder using the "..." button
  3. Choose a path that causes the folder to be on an external hard drive
  4. Exit yt-dlg and remove the external hard drive
  5. Attempt to open yt-dlg afterwards

What is the expected behavior ?

Yt-dlg opens without issue.

What happens instead ?

Yt-dlg gives the error message "failed to execute script _ _ main _ _" and refuses open.


I was downloading a Youtuber's channel using yt-dlg with the yt-dlp backend (2021.10.10) and the custom made FFmpeg versions that it recommends (https://github.com/yt-dlp/FFmpeg-Builds). I downloaded a good amount of the content at first on my computer's internal hard drive, but space was getting low so I stopped and moved all of that content to an external hard drive. I then started downloading the rest of the content after making the download path lead to the external hard drive. I didn't finish once more (since Youtube throttles downloads now and makes everything take forever) so I started again the next day.

I felt like setting up yt-dlg with the link to the Youtube channel before attaching the external hard drive, so I attempted to start it up to do so. However, the program didn't function, spitting out the error "failed to execute script _ _ main _ _". I tried opening it a few more times in case it was a random occurrence, but it kept happening. I then restarted the computer to try and see if that would help but it once more gave the same error and result. I attempted to fix it by deleting the exe and replacing it to see if I somehow broke it doing something else, but it still gave the same results. Finally I got a spark and reattached the external hard drive and THEN attempted to open the program. It opened without any issue and ready to go.

I believe this is due to the program being unable to open itself when it no longer can find the download folder path that it was set to in a previous session.

Doing a little testing on this train of thought, I created a "Test" folder and made that the download folder. I downloaded part of a video to make sure it was working and then stopped the download and exited yt-dlg. I then deleted the "Test" folder and went back to yt-dlg to see if it would open. I then saw that it did and that it had recreated the "Test" folder, something I didn't know that the program could do.

Given this, I now think that the reason yt-dlg didn't open before I put in my external hard drive is because it was trying to create the previous download path that it used. Since that path was on an external it couldn't find a way to recreate that path, freaked out, and refused to open until I reattached the external to allow it to use the path it expected.

In short, I'm pretty sure there is a bug with yt-dlg where the program is unable to open itself in the case of the previously used download path no longer being available and said path is unable to be recreated by yt-dlg itself for one reason or another.

@oleksis
Copy link
Owner

oleksis commented Oct 20, 2021

Thanks for reports the issue, and providing lots details. I will check and manage that case from external paths.

I advise you can see/change the settings in %APPDATA%\yt-dlg\settings.json in the key save_path update de value to a path exists.

@oleksis oleksis added the bug Something isn't working label Oct 20, 2021
@Hooperla
Copy link
Author

Glad to be of help, and thanks for the tip!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants