problem #4005

Closed
opened 2026-02-21 00:05:32 -05:00 by deekerman · 2 comments
Owner

Originally created by @Billybangleballs on GitHub (Feb 4, 2015).

I encountered this error using youtube-dl version 2015.02.04
/usr/bin/youtube-dl https://www.youtube.com/watch?v=Bb4TPuXCd8U

Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/bin/youtube-dl/main.py", line 19, in
File "/usr/bin/youtube-dl/youtube_dl/init.py", line 382, in main

File "/usr/bin/youtube-dl/youtube_dl/init.py", line 372, in _real_main

File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1352, in download
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 619, in extract_info
File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 268, in extract
File "/usr/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 802, in _real_extract
File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 396, in _download_webpage
File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 320, in _download_webpage_handle
File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 294, in _request_webpage
File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 460, in report_download_webpage
File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 452, in to_screen
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 388, in to_screen
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 402, in to_stdout
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 391, in _write_string
File "/usr/bin/youtube-dl/youtube_dl/utils.py", line 943, in write_string
IOError: [Errno 32] Broken pipe

It has done it several times with any youtube video

I tried to look at the files mentioned in the error message but I can't find them.
Sorry I'm a bit of a n00b at this.

Originally created by @Billybangleballs on GitHub (Feb 4, 2015). I encountered this error using youtube-dl version 2015.02.04 /usr/bin/youtube-dl https://www.youtube.com/watch?v=Bb4TPuXCd8U Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/bin/youtube-dl/__main__.py", line 19, in <module> File "/usr/bin/youtube-dl/youtube_dl/**init**.py", line 382, in main File "/usr/bin/youtube-dl/youtube_dl/**init**.py", line 372, in _real_main File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1352, in download File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 619, in extract_info File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 268, in extract File "/usr/bin/youtube-dl/youtube_dl/extractor/youtube.py", line 802, in _real_extract File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 396, in _download_webpage File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 320, in _download_webpage_handle File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 294, in _request_webpage File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 460, in report_download_webpage File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 452, in to_screen File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 388, in to_screen File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 402, in to_stdout File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 391, in _write_string File "/usr/bin/youtube-dl/youtube_dl/utils.py", line 943, in write_string IOError: [Errno 32] Broken pipe It has done it several times with any youtube video I tried to look at the files mentioned in the error message but I can't find them. Sorry I'm a bit of a n00b at this.
Author
Owner

@Billybangleballs commented on GitHub (Feb 4, 2015):

I might mention that stdin & stdout are being redirected and this seems to be the root of the problem.
To elaborate: I am trying to run youtube-dl on a remote machine using ncat as the transport between the machines.
The calling machine's output seems ok but I'll put it here in case it throws some light on the problem.

C:>echo /usr/bin/youtube-dl https://www.youtube.com/watch?v=Bb4TPuXCd8U | ncat -vvv 192.168.0.33 65432
Ncat: Version 6.46 ( http://nmap.org/ncat )
libnsock nsi_new2(): nsi_new (IOD #1)
libnsock nsock_connect_tcp(): TCP connection requested to 192.168.0.33:65432 (IOD #1) EID 8
libnsock nsock_trace_handler_callback(): Callback: CONNECT SUCCESS for EID 8 [192.168.0.33:65432]
Ncat: Connected to 192.168.0.33:65432.
libnsock nsi_new2(): nsi_new (IOD #2)
libnsock nsock_read(): Read request from IOD #1 [192.168.0.33:65432](timeout: -1ms) EID 18
libnsock nsock_readbytes(): Read request for 0 bytes from IOD #2 [peer unspecified] EID 26
libnsock nsock_trace_handler_callback(): Callback: READ SUCCESS for EID 26 [peer unspecified](66 bytes): /usr/bin/youtube-dl https://www.youtube.com/watch?v=Bb4TPuXCd8U ..
libnsock nsock_trace_handler_callback(): Callback: WRITE SUCCESS for EID 35 [192.168.0.33:65432]
libnsock nsock_readbytes(): Read request for 0 bytes from IOD #2 [peer unspecified] EID 42
libnsock nsock_trace_handler_callback(): Callback: READ EOF for EID 42 [peer unspecified]
libnsock nsock_trace_handler_callback(): Callback: READ EOF for EID 18 [(null):-1]
close: No error
C:>

On the other end is :-
pi@raspberrypi ~ $ ncat -4 --exec "/bin/bash" -l 65432 --keep-open &

This arrangement works for many things but unfortunately not for youtube-dl.

Is there a cure?

@Billybangleballs commented on GitHub (Feb 4, 2015): I might mention that stdin & stdout are being redirected and this seems to be the root of the problem. To elaborate: I am trying to run youtube-dl on a remote machine using ncat as the transport between the machines. The calling machine's output seems ok but I'll put it here in case it throws some light on the problem. C:>echo /usr/bin/youtube-dl https://www.youtube.com/watch?v=Bb4TPuXCd8U | ncat -vvv 192.168.0.33 65432 Ncat: Version 6.46 ( http://nmap.org/ncat ) libnsock nsi_new2(): nsi_new (IOD #1) libnsock nsock_connect_tcp(): TCP connection requested to 192.168.0.33:65432 (IOD #1) EID 8 libnsock nsock_trace_handler_callback(): Callback: CONNECT SUCCESS for EID 8 [192.168.0.33:65432] Ncat: Connected to 192.168.0.33:65432. libnsock nsi_new2(): nsi_new (IOD #2) libnsock nsock_read(): Read request from IOD #1 [192.168.0.33:65432](timeout: -1ms) EID 18 libnsock nsock_readbytes(): Read request for 0 bytes from IOD #2 [peer unspecified] EID 26 libnsock nsock_trace_handler_callback(): Callback: READ SUCCESS for EID 26 [peer unspecified](66 bytes): /usr/bin/youtube-dl https://www.youtube.com/watch?v=Bb4TPuXCd8U .. libnsock nsock_trace_handler_callback(): Callback: WRITE SUCCESS for EID 35 [192.168.0.33:65432] libnsock nsock_readbytes(): Read request for 0 bytes from IOD #2 [peer unspecified] EID 42 libnsock nsock_trace_handler_callback(): Callback: READ EOF for EID 42 [peer unspecified] libnsock nsock_trace_handler_callback(): Callback: READ EOF for EID 18 [(null):-1] close: No error C:> On the other end is :- pi@raspberrypi ~ $ ncat -4 --exec "/bin/bash" -l 65432 --keep-open & This arrangement works for many things but unfortunately not for youtube-dl. Is there a cure?
Author
Owner

@Billybangleballs commented on GitHub (Feb 4, 2015):

After reading http://stackoverflow.com/questions/15793886/how-to-avoid-a-broken-pipe-error-when-printing-a-large-amount-of-formatted-data

I added a -q to the command line and it provided a work-around.

@Billybangleballs commented on GitHub (Feb 4, 2015): After reading http://stackoverflow.com/questions/15793886/how-to-avoid-a-broken-pipe-error-when-printing-a-large-amount-of-formatted-data I added a -q to the command line and it provided a work-around.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl#4005
No description provided.