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

Error! Unhandled error (execa). #243

Open
harrydevs2021 opened this issue Nov 20, 2021 · 19 comments · May be fixed by #385
Open

Error! Unhandled error (execa). #243

harrydevs2021 opened this issue Nov 20, 2021 · 19 comments · May be fixed by #385
Assignees
Labels
bug Something isn't working

Comments

@harrydevs2021
Copy link

Describe the bug
After pasting a video link, and clicking download, the progress bar turns red immediately and displays: Error! Unhandled error (execa). Was working correctly on previous verison 2.3.1

To Reproduce
Steps to reproduce the behavior:

  1. Paste video link
  2. Click on +

Expected behavior
Video should be downloaded

Additional info (please complete the following information):

  • OS: OS X El Capitan 10.11.6
  • Application version 2.4.0
  • Application type dmg in Applications folder

Additional context
{
"shortMessage": "Command failed with exit code 127: /Applications/Open Video Downloader.app/Contents/Resources/app.asar.unpacked/binaries/yt-dlp-unix -J --flat-playlist --no-cache-dir --ignore-config --user-agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36 --no-check-certificate --yes-playlist undefined",
"command": "/Applications/Open Video Downloader.app/Contents/Resources/app.asar.unpacked/binaries/yt-dlp-unix -J --flat-playlist --no-cache-dir --ignore-config --user-agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36 --no-check-certificate --yes-playlist undefined",
"exitCode": 127,
"stdout": "",
"stderr": "env: python3: No such file or directory",
"failed": true,
"timedOut": false,
"isCanceled": false,
"killed": false
}

@harrydevs2021 harrydevs2021 added the bug Something isn't working label Nov 20, 2021
@StefanLobbenmeier
Copy link
Contributor

StefanLobbenmeier commented Nov 21, 2021

Workaround, use version 2.3.1 instead

I think this is because of this commit: b288ff3 That now this application uses yt-dlp which has a dependency to phyton

@jely2002
Copy link
Owner

Youtube-dl has a dependency on python as well. Is this on a M1 Mac?

@StefanLobbenmeier
Copy link
Contributor

Oh I assumed that this would use the compiled version of YouTube-dl, not sure

then the issue might be an old macOS version shipping an outdated Python version? I can check the installer Python version later, but it Is macOS 10.12 on a 2015 MacBook Pro

@jely2002
Copy link
Owner

jely2002 commented Nov 21, 2021

Thanks for investigating. Looks like the version used by the reporter only ships with Python 2.7.
As a fix he can install python3 with using this link:
https://www.python.org/ftp/python/3.5.0/python-3.5.0-macosx10.6.pkg

Please let me know if this fixed it on El Capitan.

@jely2002 jely2002 self-assigned this Nov 21, 2021
@jely2002 jely2002 added the awaiting response This issue is pending response from the author label Nov 21, 2021
@StefanLobbenmeier
Copy link
Contributor

StefanLobbenmeier commented Nov 21, 2021

I also did some more investigation and I think python3 is never preinstalled with macOS. Could you also consider using the compiled binary for macOS instead?

There is one for this version: https://github.com/yt-dlp/yt-dlp/releases/tag/2021.10.22
It looks like the build failed for the more recent versions and the fix is still in progress: yt-dlp/yt-dlp#1221

@StefanLobbenmeier
Copy link
Contributor

StefanLobbenmeier commented Nov 21, 2021

(I am on my own machine now - macOS 11.4, python 3.9.8 is installed, but ideally this works without python as well)

I just tried replacing /Applications/Open Video Downloader.app/Contents/Resources/app.asar.unpacked/binaries/yt-dlp-unix with the macOS one from the tag, a video+audio download worked. Downloading audio only I get

ERROR: Postprocessing: module mutagen was not found. Please install using `python -m pip install mutagen`

Looks like this is a known issue already though: #241

@jely2002
Copy link
Owner

jely2002 commented Nov 21, 2021

Good find. Looks like they disabled the Mac build. All we can do for now is wait until they re-enable it.
The mutagen error is a separate issue (#241), I believe it can be worked around by disabling 'save-metadata' in the settings.

I'm already starting to regret the decision to switch to yt-dlp.

@jely2002 jely2002 removed the awaiting response This issue is pending response from the author label Nov 21, 2021
@harrydevs2021
Copy link
Author

Youtube-dl has a dependency on python as well. Is this on a M1 Mac?

It's an Intel Mac

@harrydevs2021
Copy link
Author

Thanks for investigating. Looks like the version used by the reporter only ships with Python 2.7. As a fix he can install python3 with using this link: https://www.python.org/ftp/python/3.5.0/python-3.5.0-macosx10.6.pkg

Please let me know if this fixed it on El Capitan.

Yes, in Terminal > Python -- version, shows 2.7.10

I downloaded and installed the pkg from the link provided.

Terminal > Python -- version, still shows shows 2.7.10 after restart.

The Error! Unhandled error (execa) in Open Video Downloader still occurs. I will revert back to v2.3.1 for now.

@mark-up
Copy link

mark-up commented Dec 16, 2021

I have this same issue, running MacOS 10.14 with Python 3 installed (via Anaconda). Perhaps you could provide a setting to let us provide our own Python binary location.

@StefanLobbenmeier
Copy link
Contributor

Good find. Looks like they disabled the Mac build. All we can do for now is wait until they re-enable it.

https://github.com/yt-dlp/yt-dlp/releases/tag/2021.12.01

Looks like it is back up again

@StefanLobbenmeier
Copy link
Contributor

StefanLobbenmeier commented Dec 18, 2021

Perhaps you could provide a setting to let us provide our own Python binary location.

Looking through the source code I found this:

console.log("yt-dlp already installed, skipping auto-install.")

So I am pretty sure this means that if you put yt-dlp or ytdlp on the path it will use the one on the path instead.

Edit: ok I am not so sure anymore. Maybe this only affects the Updater, since for the actual query the preinstalled YouTube-dl is not checked:

let command = this.environment.paths.ytdl; //Set the command to be executed

I feel like there might be a bug there, or I am misunderstanding something.

@StefanLobbenmeier
Copy link
Contributor

StefanLobbenmeier commented Dec 18, 2021

I have this same issue, running MacOS 10.14 with Python 3 installed (via Anaconda).

today I found out that there is a different path for the macOS gui. You can remedy that by launching OpenVideoDownloader from the terminal. Or you can set your launchctl path in your .bash_profile like this:

launchctl setenv PATH $PATH

source: https://apple.stackexchange.com/a/51678

On my own machine I did not do that however, i just installed it through brew and that puts it in /usr/local/bin which seems to work as well

I just found out that python3 seems to be preinstalled on my machine (Big Sur). Possibly it is also installed on earlier versions of macOS, but there is one in /usr/bin that I am pretty sure I did not put there:

➜  ~ which -a python3
/usr/local/bin/python3
/usr/bin/python3

Also confirmed by others here: https://stackoverflow.com/questions/62616464/what-versions-of-python-is-shipped-with-macos-11-big-sur

There is one more alternative to fix this within open Video downloader like this: https://github.com/sindresorhus/fix-path

@SecretUnicorn
Copy link

So ver 2.4.0 does not fix the issue correct? I installed mutagen with pip and pip3, both with no effect :( Downloading without metadata obv. solves it but is not a permanent solution

@northwinds
Copy link

Same error since updating to 2.4.0 - I'm on Osx 10.14.6

@himyjan
Copy link

himyjan commented May 16, 2022

#354 (comment)

@olegshulyakov
Copy link

Update electron-builder to version ^23.0.0 is going to fix this problem

olegshulyakov added a commit to olegshulyakov/youtube-dl-gui that referenced this issue Jun 18, 2022
olegshulyakov added a commit to olegshulyakov/youtube-dl-gui that referenced this issue Jun 18, 2022
@StefanLobbenmeier
Copy link
Contributor

StefanLobbenmeier commented Jun 18, 2022

@olegshulyakov How is upgrading electron gonna fix the dependency on python3?

I think there is a separate error with the same error message in the other ticket(s), but this one was originally caused by missing python3 on older macOS versions.

@olegshulyakov
Copy link

@StefanLobbenmeier Sorry for misleading. I have opened PR to address this issue since it happens quite often.

Fix of this issue contains of several parts:

  1. Fix when python is not found on local machine - this is done by updating electron-builder, see Exit code: ENOENT. spawn /usr/bin/python error after updating macOS electron-userland/electron-builder#6726
  2. Download binaries by correct urls.
  3. Create binary folder if it does not exist to avoid exception writing to not existing path.
  4. Set chmod 0755 to all binaries, not just first one.

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
8 participants