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

Permission denied Python error #8428

Closed
styler2go opened this issue Feb 4, 2016 · 14 comments
Closed

Permission denied Python error #8428

styler2go opened this issue Feb 4, 2016 · 14 comments

Comments

@styler2go
Copy link

@styler2go styler2go commented Feb 4, 2016

Hello, i get the following Python error:

[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'--prefer-ffmpeg', u'-o', u'8dZDdW7v4Q8', >u'http://youtu.be/8dZDdW7v4Q8']
Traceback (most recent call last):
File "main.py", line 19, in
File "youtube_dl__init__.pyo", line 410, in main
File "youtube_dl__init__.pyo", line 377, in _real_main
File "youtube_dl\YoutubeDL.pyo", line 343, in init
File "youtube_dl\YoutubeDL.pyo", line 2000, in _setup_opener
File "youtube_dl\utils.pyo", line 518, in make_HTTPS_handler
File "ssl.pyo", line 440, in create_default_context
File "ssl.pyo", line 391, in load_default_certs
File "ssl.pyo", line 378, in _load_windows_store_certs
WindowsError: [Error 5] Zugriff verweigert

I am very sure that my permissions are set correctly. It's running on windows. Any idea?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 5, 2016

Provide more context. Possible duplicate of #7951.

@styler2go
Copy link
Author

@styler2go styler2go commented Feb 8, 2016

I am running it from a PHP script.

PHP is running as PHP-CGI launched by IIS.

If PHP-CGI is being launched as Low Integrity by IIS this can surely be the bug. It worked before i upgraded.

How can i be sure that PHP is running as low integrity?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 8, 2016

Duplicate of #7951.

@dstftw dstftw closed this Feb 8, 2016
@styler2go
Copy link
Author

@styler2go styler2go commented Feb 8, 2016

Is there any workaround yet?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 8, 2016

Read linked issue #7951 (comment).

@styler2go
Copy link
Author

@styler2go styler2go commented Feb 8, 2016

I've read that already. I also read the Python Bug tracker but i could not find any workaround. So i guess there doesn't exist any?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 8, 2016

For example, --no-check-certificate should work in such cases.

@styler2go
Copy link
Author

@styler2go styler2go commented Feb 8, 2016

I saw that and i tried it but it didn't work. So i assumed this will be a workaround in a future youtube-dl version.

Here is my latest debug output:

WindowsError: [Error 5] Zugriff verweigert
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'--no-check-certificate', u'--prefer-ffmpeg', u'-o', u'8dZDdW7v4Q8', u'http://youtu.be/8dZDdW7v4Q8']
Traceback (most recent call last):
File "main.py", line 19, in
File "youtube_dl__init__.pyo", line 411, in main
File "youtube_dl__init__.pyo", line 378, in _real_main
File "youtube_dl\YoutubeDL.pyo", line 343, in init
File "youtube_dl\YoutubeDL.pyo", line 1999, in _setup_opener
File "youtube_dl\utils.pyo", line 518, in make_HTTPS_handler
File "ssl.pyo", line 440, in create_default_context
File "ssl.pyo", line 391, in load_default_certs
File "ssl.pyo", line 378, in _load_windows_store_certs
WindowsError: [Error 5] Zugriff verweigert

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 8, 2016

Try python <= 2.7.8.

@styler2go
Copy link
Author

@styler2go styler2go commented Feb 8, 2016

The problem still exists with python 2.7.8:

C:\Users\Administrator\Downloads\PSTools>youtube-dl --verbose --no-check-certifi
cate --prefer-ffmpeg -o "8dZDdW7v4Q8" http://youtu.be/8dZDdW7v4Q
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'--no-check-certificate', u'--prefer-
ffmpeg', u'-o', u'8dZDdW7v4Q8', u'http://youtu.be/8dZDdW7v4Q']
Traceback (most recent call last):
File "main.py", line 19, in
File "youtube_dl__init__.pyo", line 411, in main
File "youtube_dl__init__.pyo", line 378, in _real_main
File "youtube_dl\YoutubeDL.pyo", line 343, in init
File "youtube_dl\YoutubeDL.pyo", line 1999, in _setup_opener
File "youtube_dl\utils.pyo", line 518, in make_HTTPS_handler
File "ssl.pyo", line 440, in create_default_context
File "ssl.pyo", line 391, in load_default_certs
File "ssl.pyo", line 378, in _load_windows_store_certs
WindowsError: [Error 5] Access is denied

C:\Users\Administrator\Downloads\PSTools>python --version
Python 2.7.8

C:\Users\Administrator\Downloads\PSTools>youtube-dl --version
2016.02.04

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 8, 2016

Have you rebuild youtube-dl.exe with python 2.7.8?

@styler2go
Copy link
Author

@styler2go styler2go commented Feb 8, 2016

Sorry, my fault. I thought i just have to install python 2.7.8.
I will try rebuilding youtube-dl with python 2.7.8.

@devmes
Copy link

@devmes devmes commented Jul 14, 2016

In my case the "windows compatibility mode" solved the problem
right-click on youtube-dl.exe -> Properties -> Compatibility -> Change settings for all users -> Compatibility mode -> Windows XP SP3

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jul 14, 2016

Another solution is downloading Python 3.5 and youtube-dl via it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.