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

Unable to use youtube-dl #10288

Open
Velzeee opened this issue Aug 10, 2016 · 14 comments
Open

Unable to use youtube-dl #10288

Velzeee opened this issue Aug 10, 2016 · 14 comments

Comments

@Velzeee
Copy link

@Velzeee Velzeee commented Aug 10, 2016

Using these videos seperately:
https://www.youtube.com/watch?v=kUOuHpsY8N4
https://www.youtube.com/watch?v=R1ZzCDim2wU

I receive this error and thus am unable to use the program:

[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'https://www.youtube.com/watch?v=R1ZzCDim2wU']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2016.08.10
[debug] Python version 3.4.4 - Windows-10-10.0.10586
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] R1ZzCDim2wU: Downloading webpage
ERROR: Unable to download webpage: <urlopen error [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions> (caused by URLError(OSError(10013, 'An attempt was made to access a socket in a way forbidden by its access permissions', None, 10013, None),))
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp137uvqjd\build\youtube_dl\extractor\common.py", line 394, in _request_webpage
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp137uvqjd\build\youtube_dl\YoutubeDL.py", line 1994, in urlopen
File "C:\Python\Python34\lib\urllib\request.py", line 464, in open
File "C:\Python\Python34\lib\urllib\request.py", line 482, in _open
File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp137uvqjd\build\youtube_dl\utils.py", line 1003, in https_open
File "C:\Python\Python34\lib\urllib\request.py", line 1185, in do_open

@stelariusinfinitek
Copy link

@stelariusinfinitek stelariusinfinitek commented Aug 10, 2016

Just saw this. Are you using the latest version? Because I youtube-dl-ed your first video and it worked without problems.

@Velzeee
Copy link
Author

@Velzeee Velzeee commented Aug 10, 2016

Yep, I'm using the latest(2016.08.10).

@stelariusinfinitek
Copy link

@stelariusinfinitek stelariusinfinitek commented Aug 10, 2016

I'm sorry, it was written there. It could be a problem with Windows 10. I'm using Linux (Arch) and it's working fine.

@Velzeee
Copy link
Author

@Velzeee Velzeee commented Aug 10, 2016

Dang, that stinks.

@stelariusinfinitek
Copy link

@stelariusinfinitek stelariusinfinitek commented Aug 10, 2016

I hope I didn't say something wrong. I'm not a dev but I'm trying to help (sometimes I'm a bit stupid). I know there is bash for Windows after the Anniversary Update. Did you try it with youtube-dl?

@Velzeee
Copy link
Author

@Velzeee Velzeee commented Aug 10, 2016

No worries, dude.I'm just upset because I have been trying for the past few days to find a non-sketchy way of downloading YT videos, and this one looked the most promising but, since I haven't got it to work, idk what I'm going to do. And it's kind of important too. I haven't updated to the anniversary update(I don't believe I have anyway), but I'll check for updates.

@stelariusinfinitek
Copy link

@stelariusinfinitek stelariusinfinitek commented Aug 10, 2016

If you are in a hurry, use this : https://www.4kdownload.com/download .I know the devs will fix the problem but if you really can't wait, use an alternative for the moment.

@Velzeee
Copy link
Author

@Velzeee Velzeee commented Aug 10, 2016

Idk about that one...looks a bit sketchy..

@stelariusinfinitek
Copy link

@stelariusinfinitek stelariusinfinitek commented Aug 10, 2016

It's fine, I used it for a long time before installing Linux. Trust me. If you don't want to try the alternative, wait for the devs to give you a solution.

@phihag
Copy link
Contributor

@phihag phihag commented Aug 11, 2016

This is almost certainly a problem with your firewall (or an antivirus/firewall product). Have you allowed youtube-dl to contact arbitrary sites, at least DNS, HTTP and HTTPS? youtube-dl does not need any server rights, but does need to download websites and videos.

McAfee seems to be one of the primary culprits, i.e. in http://superuser.com/questions/635498/socket-error-errno-10013-port-forbidden-access-permissions .

@JoFu2k191
Copy link

@JoFu2k191 JoFu2k191 commented Dec 22, 2018

I get this error too, it is a firewall issue.

trying to run -F on any youtube link causes:

<urlopen error [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions> (caused by URLError(OSError(10013, 'An attempt was made to access a socket in a way forbidden by its access permissions', None, 10013, None),))

A generic error message meaning some process was unable to open a socket.

My Windows 10 Home Firewall is customized as it should be: Outbound is Blocked for ANY
exceptions are :

default rules by Microsoft
Core Network - Dynamic Host Configuration-Protokoll (DHCP) Outbound
Core Network - DNS (UDP) Outbound

custom rules
my game
my browser
cmd.exe (I added this for youtube-dl, but thats not all I need - see the error)

adding youtube-dl to my custom rules does not help
adding pyhton.exe or pythonw.ex does not help

Any idea? Because the next thing I am going to is running tools from the Sysinternals suite and maybe even wireshark. I have to admit I was out of duty for 3 years so I may be just blind here.

besides, amazing tool I have beed using for long time. I love your design ;)

EDIT: Of course, if I configure my firewall to allow outbounds by default youtube-dl works as intended.

@JoFu2k191
Copy link

@JoFu2k191 JoFu2k191 commented Dec 22, 2018

Update:

once I add an outbound rule to allow any programm to connect to remote port 443 - the issue is gone.

outbound rule is:
allow any-protocol for youtube-dl.exe to any-adress-port

a default way to configure firewall settings - and it should work!

however, the following is required here
allow any program to any-address:443

because nor, python.exe or any other .exe makes the connection? afaik?
in addition the fix is a non-practicle rule? I cant configure it this way?

Can you comment on this? Because either this is python or youtube-dl fault?
Or microsoft does not want you to open sockets the way your are doing it?
Not sure if it is a bug?

@JoFu2k191
Copy link

@JoFu2k191 JoFu2k191 commented Dec 22, 2018

Ok, I fixed it.

In my scenario youtube-dl wont work with windows firewall when an enviroment variable
is used to define the executable path for the firewall rule.

%userprofile%\folder\youtube-dl.exe - DOES NOT WORK!

C:\Users\Username\folder\youtube-dl.exe WORKS!

%Systemdrive% works for other executables I am using
%Systemroot% works for default rules defined by microsoft, like DNS/DHCP

Python?

@yanakey
Copy link

@yanakey yanakey commented Apr 4, 2020

@JoFu2k191 Thanks! Replacing %userprofile% with real path works!

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
6 participants
You can’t perform that action at this time.