Comments (19)
Upgraded the youtube-dl-php library to use master branch and the error has changed:
The command "c:\inetpub\wwwroot\youtube-dl.exe "https://www.youtube.com/watch?v=iGk5fR-t5AU" --no-playlist --print-json --ignore-config "--format=137+140/best" --simulate" failed.
Exit Code: 255(Unknown error)
Working directory: C:\inetpub\wwwroot\storage\assets\downloads
Output:
================
Error Output:
================
Traceback (most recent call last):
File "__main__.py", line 19, in <module>
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp_2hklmx2\build\youtube_dl\__init__.py", line 465, in main
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp_2hklmx2\build\youtube_dl\__init__.py", line 432, in _real_main
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp_2hklmx2\build\youtube_dl\YoutubeDL.py", line 402, in __init__
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp_2hklmx2\build\youtube_dl\YoutubeDL.py", line 2267, in _setup_opener
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp_2hklmx2\build\youtube_dl\utils.py", line 684, in make_HTTPS_handler
File "C:\Python\Python34\lib\ssl.py", line 439, in create_default_context
File "C:\Python\Python34\lib\ssl.py", line 390, in load_default_certs
File "C:\Python\Python34\lib\ssl.py", line 377, in _load_windows_store_certs
PermissionError: [WinError 5] Access is denied
Everyone has write access to the working directory, so I don't know why it says access denied.
from youtube-dl-php.
Getting closer. Tried the solution mentioned here ytdl-org/youtube-dl#10766 and it works. Only problem is that youtube-dl-php doesn't allow further prefixing of the command.
According to the mentioned solution, the command would need to be changed from:
"c:\inetpub\wwwroot\youtube-dl.exe "https://www.youtube.com/watch?v=iGk5fR-t5AU" --no-playlist --print-json --ignore-config "--format=137+140/best" --simulate"
To something like:
"c:\python\python.exe c:\inetpub\wwwroot\youtube-dl "https://www.youtube.com/watch?v=iGk5fR-t5AU" --no-playlist --print-json --ignore-config "--format=137+140/best" --simulate".
I can hack the YoutubeDL class by adding array_unshift($arguments, 'C:\Python\python.exe');
to the createProcess() method and then it works, but you know...
from youtube-dl-php.
Created pull request.
from youtube-dl-php.
What about $yt->setBinPath('C:\Python\python.exe c:\inetpub\wwwroot\youtube-dl.exe'); ? Could you try it?
from youtube-dl-php.
I tried it, but it gets quoted in a way so the command fails:
"C:\Python\python.exe c:\inetpub\wwwroot\youtube-dl.exe"
Should be quoted like this:
"C:\Python\python.exe" "c:\inetpub\wwwroot\youtube-dl.exe"
from youtube-dl-php.
OK, merged ;)
from youtube-dl-php.
@jezzdk and @norkunas i am facing the same error can you please let me know how can i fix this issue.
Thanks in advance.
Error Output:
Fatal Python error: Failed to initialize Windows random API (CryptoGen)
from youtube-dl-php.
@usamamashkoor so have you tried $yt->setPythonPath()
?
from youtube-dl-php.
I've got the same error.
I set python path, but got the same error.
from youtube-dl-php.
I've got the same error.
I set python path, but got the same error.
Could you dump the generated command line?
from youtube-dl-php.
Please check.
If I run command in terminal, it works.
from youtube-dl-php.
Did you try to call $dl->setPythonPath()
to configure the path to python ?
from youtube-dl-php.
I set python path.
I use Pyton 3.6.
As you can see it doens't worke even I set Python path.
from youtube-dl-php.
from youtube-dl-php.
Okay, so now it's a different error. From the context I can only guess that somehow your environment configuration breaks this and from here I can't help you anymore, so you'll have to search the solution based on the error you have now. Maybe this would help for you appveyor/ci#1995 (comment)
from youtube-dl-php.
I think it's not environment problem, if I enter command on terminal directly, it works.
from youtube-dl-php.
I think still it is. The started process probably doesn't get all needed env vars and so it fails.
Could you try to directly edit symfony Process code and add for example PYTHONPATH
and 'SYSTEMROOT' env vars with proper values? See mgedmin/check-manifest#52
from youtube-dl-php.
Can you tell me in detail, please?
from youtube-dl-php.
I think it's not related with youtube dl library, maybe it's related with symfony process.
Thanks for your help.
from youtube-dl-php.
Related Issues (20)
- No such file or directory HOT 3
- usage in mutual server HOT 1
- url HOT 1
- link HOT 1
- Error with yt-dlp HOT 26
- Can't set environment variable for process on Windows OS HOT 3
- Bugfix onProgress event for yt-dlp not triggering some videos before 100%
- INTERNAL ERROR: cannot create temporary directory! HOT 8
- postprocessor-args not impplimented HOT 4
- Bug: YoutubeDl\Entity\Video::getCategories(): Return value must be of type array, null returned
- file_get_contents - No such file or directory, when video title has unsupported characters HOT 20
- Missing developer option(s) HOT 3
- Need `--trim-filenames` option to be added please! HOT 4
- YoutubeDl\Entity\Video::getTags(): Return value must be of type array, null returned HOT 5
- Need `-U`, `--update` option to help with debugging when problems happen HOT 3
- Need to add `uploader_url` HOT 1
- does `--write-comments` need to be set for comments to be available in `getComments()`? HOT 4
- Options `--no-write-comments`, `--no-write-description`, `--no-write-thumbnail`, `--no-write-sub`, `--no-write-auto-sub` HOT 4
- Unable to run basic example with an Access denied error. HOT 2
- Virus report "ITagUtils.php" HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from youtube-dl-php.