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

asp.net web service latest version #7453

Closed
codaman opened this issue Nov 11, 2015 · 17 comments
Closed

asp.net web service latest version #7453

codaman opened this issue Nov 11, 2015 · 17 comments

Comments

@codaman
Copy link

@codaman codaman commented Nov 11, 2015

i'm trying to code c# web service that using youtube-dl.exe in command and returns me all format output before i used 2015.10.18 version there is no problem but i update to latest version there is no output. In debug mode it also works but after publishing to real server i couldnt get no output. Can anyone help me. I tried all privilages

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Nov 11, 2015

Maybe there are error messages. Can you catch standard error (stderr) outputs in C#? If so, paste them here.

@codaman
Copy link
Author

@codaman codaman commented Nov 11, 2015

yes i'm getting this error

i'm using youtube-dl on .net web service it also get this error

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 338, in _init File "youtube_dl\YoutubeDL.pyo", line 1969, in _setup_opener File "youtube_dl\utils.pyo", line 492, 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

but there is no problem 2015.10.18 and older versions

@codaman
Copy link
Author

@codaman codaman commented Nov 11, 2015

and i'm also checkin what cause this i'm searching commits after 2015.10.18 there is a a commit Fix py2exe build (#7276) this line added "dll_excludes": ['w9xpopen.exe', 'crypt32.dll'],. may be crypt32.dll cause this access problem. may be i have to rebuid and create and exe file

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Nov 11, 2015

With crypt32.dll bundled it does not work at all. As seen from log your issue is related to insufficient access when loading certificates.
What is the user account the service is running under? Try running under account with Administrator access. What happens when you run youtube-dl from cmd?

@codaman
Copy link
Author

@codaman codaman commented Nov 11, 2015

it works run on cmd in server. it also works my own computer web service debug mode but when i publish it to server, it isnt working. i gave all privilages to youtube-dl.exe and also its directory and also i closed firewall. nothing work

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Nov 11, 2015

Then it even more likely to be a problem with account rights. I'm closing this issues since it does not look like an issue in youtube-dl.

@dstftw dstftw closed this Nov 11, 2015
@codaman
Copy link
Author

@codaman codaman commented Nov 11, 2015

may be iis cant access certificate store .i dont know how to grant iis to access. why 2015.10.18 there is no problem

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Nov 12, 2015

Version 2015.10.18 is built with Python 2.7.8, which does not check certificates at all.

Please DO NOT spam your problem on other issues anymore. They're totally different issues.

The following stackoverflow post may help you: http://stackoverflow.com/questions/33264502/windowserror-error-5-access-is-denied-using-urllib2. Your problem is outside the scope of youtube-dl.

@trandinhnam
Copy link

@trandinhnam trandinhnam commented Dec 30, 2015

any updates package for this issue?

@codaman
Copy link
Author

@codaman codaman commented Dec 31, 2015

@trandinhnam
Copy link

@trandinhnam trandinhnam commented Jan 12, 2016

So, how to solve problem? Do you mean I download source code and modify it then build an other version? Because when i check on server, the issue still exist with the 09/01/2016 package? On the server, i cannot run package with administrator role. Everything is ok on my machine, but it's not working on web service server?

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jan 12, 2016

After some investigation I believe it's actually a Python bug. See #7951 and http://bugs.python.org/issue25939 for more information. A possible solution can be running youtube-dl outside the web server.

@trandinhnam
Copy link

@trandinhnam trandinhnam commented Jan 12, 2016

Request the IT host update new python version for windows is ok?

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jan 12, 2016

This bug exists in latest Python 2.7.11 and 3.5.1, so it won't help if I'm right.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jan 12, 2016

Another option is to build your own youtube-dl.exe with Python 2.7.8. It's simpler:

  1. Installing Python 2.7.8 and py2exe for Python 2
  2. Download the latest source tarball of youtube-dl and extract it
  3. Run the following commands:
C:\>cd youtube-dl
C:\youtube-dl>python.exe setup.py py2exe

Then there will be youtube-dl.exe.

@trandinhnam
Copy link

@trandinhnam trandinhnam commented Jan 12, 2016

Thank yan12125. Now it is working.
But if source code update some features which use the library of Python 3x, this workaround may have issues.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Jan 12, 2016

Don't worry. We'll support Python 2.7 for a long time. See #2396 for more information.

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.