YASSlNE
September 18, 2022, 12:39am
1
site name = https://prismatic-cobbler-dd5ceb.netlify.app/
hey, you can reproduce the error when you go to https://prismatic-cobbler-dd5ceb.netlify.app/.netlify/functions/api/?v=https://www.youtube.com/watch?v=9fAyEqgBGyU
(or change the v parameter with any youtube video, you will get the same error, I didn’t get what is the problem, is it because of the youtube-dl-exec package ?
YASSlNE
September 18, 2022, 6:46pm
3
same problem, It worked with the command line but when I execute “./yt-dlp_linux 9fAyEqgBGyU --format bestaudio --skip-download --dump-single-json” for example but it won’t when I code it.
You need to share a reproduction in the form of a codebase - maybe a Git repo.
YASSlNE
September 22, 2022, 9:39pm
5
sorry for the late reply, here’s the code GitHub - YASSlNE/YTAO_API
I spent a few hours trying this out, only to discover this:
opened 09:37AM - 24 Oct 21 UTC
closed 10:09AM - 24 Oct 21 UTC
question
``` bash
2021-10-24T09:15:09.936Z 85f334fc-5831-45bb-b3fb-652f79ba3857 INFO Er… ror: Command failed with exit code 127: /opt/nodejs/node_modules/youtube-dl-exec/bin/youtube-dl https://www.youtube.com/watch?v=P_MfXIRQIwc --dump-single-json --no-warnings --no-call-home --no-check-certificate --prefer-free-formats --youtube-skip-dash-manifest --referer https://www.youtube.com/watch?v=P_MfXIRQIwc
/usr/bin/env: python: No such file or directory
at makeError (/opt/nodejs/node_modules/execa/lib/error.js:60:11)
at handlePromise (/opt/nodejs/node_modules/execa/index.js:118:26)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async getYoutubeVideCloseCpationV2 (/var/task/handlers/webscraper/v1/index.js:253:22)
at async Runtime.module.exports.handler (/var/task/handlers/webscraper/v1/index.js:65:27) {
shortMessage: 'Command failed with exit code 127: /opt/nodejs/node_modules/youtube-dl-exec/bin/youtube-dl https://www.youtube.com/watch?v=P_MfXIRQIwc --dump-single-json --no-warnings --no-call-home --no-check-certificate --prefer-free-formats --youtube-skip-dash-manifest --referer https://www.youtube.com/watch?v=P_MfXIRQIwc',
command: '/opt/nodejs/node_modules/youtube-dl-exec/bin/youtube-dl https://www.youtube.com/watch?v=P_MfXIRQIwc --dump-single-json --no-warnings --no-call-home --no-check-certificate --prefer-free-formats --youtube-skip-dash-manifest --referer https://www.youtube.com/watch?v=P_MfXIRQIwc',
escapedCommand: '"/opt/nodejs/node_modules/youtube-dl-exec/bin/youtube-dl" "https://www.youtube.com/watch?v=P_MfXIRQIwc" --dump-single-json --no-warnings --no-call-home --no-check-certificate --prefer-free-formats --youtube-skip-dash-manifest --referer "https://www.youtube.com/watch?v=P_MfXIRQIwc"',
exitCode: 127,
signal: undefined,
signalDescription: undefined,
stdout: '',
stderr: '/usr/bin/env: python: No such file or directory',
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}
```
I reached till that exact spot shared by that user.
It says, python3
not found. There doesn’t seem to be an easy way to install Python in AWS Lambda running on Node.js. So, I don’t think what you’re trying is possible.
1 Like
YASSlNE
September 28, 2022, 4:27pm
7
Okay, thanks anyway for your efforts