Error when attempting to download a youtube channel #3549

Closed
opened 2026-02-20 23:25:45 -05:00 by deekerman · 2 comments
Owner

Originally created by @wolfman1360 on GitHub (Nov 27, 2014).

Hello there, I am getting the following output when attempting to download certain youtube channels. This is an example of one of them.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Tyler>cd c:\

c:>youtube-dl --verbose http://www.youtube.com/user/TheWreckingYard/videos -o y
outube/%(uploader)s/%(autonumber)s-%(title)s-%(upload_date)s.%(ext)s -f 18
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'http://www.youtube.com/user/TheWreckin
gYard/videos', '-o', 'youtube/%(uploader)s/%(autonumber)s-%(title)s-%(upload_dat
e)s.%(ext)s', '-f', '18']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2014.11.27
[debug] Python version 2.7.8 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-67731-, ffprobe N-67731-
[debug] Proxy map: {}
[download] Downloading playlist: TheWreckingYard
[youtube:user] TheWreckingYard: Downloading video ids from 1 to 51
[youtube:user] TheWreckingYard: Downloading video ids from 51 to 101
[youtube:user] TheWreckingYard: Downloading video ids from 101 to 151
[youtube:user] TheWreckingYard: Downloading video ids from 151 to 201
[youtube:user] TheWreckingYard: Downloading video ids from 201 to 251
[youtube:user] TheWreckingYard: Downloading video ids from 251 to 301
[youtube:user] TheWreckingYard: Downloading video ids from 301 to 351
[youtube:user] TheWreckingYard: Downloading video ids from 351 to 401
[youtube:user] TheWreckingYard: Downloading video ids from 401 to 451
[youtube:user] TheWreckingYard: Downloading video ids from 451 to 501
[youtube:user] TheWreckingYard: Downloading video ids from 501 to 551
[youtube:user] TheWreckingYard: Downloading video ids from 551 to 601
[youtube:user] playlist TheWreckingYard: Downloading 599 videos
[download] Downloading video #1 of 599
[youtube] Confirming age
[youtube] JJGDWpLznoo: Downloading webpage
[youtube] JJGDWpLznoo: Downloading video info webpage
[youtube] JJGDWpLznoo: Extracting video information
[youtube] JJGDWpLznoo: Downloading DASH manifest
[debug] Invoking downloader on u'https://r2---sn-5aanugx5h-tfbe.googlevideo.com/
videoplayback?ipbits=0&mm=31&initcwndbps=1187500&itag=18&ms=au&source=youtube&mv
=m&dur=75.627&key=yt5&upn=G77TtW-loFo&sparams=dur%2Cid%2Cinitcwndbps%2Cip%2Cipbi
ts%2Citag%2Cmm%2Cms%2Cmv%2Crequiressl%2Csource%2Cupn%2Cexpire&signature=EC53AE4F
D3D17603441AB3084960E0DEF15A6A8A.A87DD8E8A7E0A677F5C2B6BB70AD5FDBC31E57C6&ip=207
.161.242.186&requiressl=yes&fexp=901496%2C907259%2C923349%2C927622%2C931349%2C93
2404%2C943909%2C947209%2C948124%2C949423%2C952302%2C952605%2C952901%2C953803%2C9
53912%2C957103%2C957105%2C957201&id=o-AIIcYbIK0oJ_Ixi0Ksokmi7T-nUGQzEOLE0c-lZyjJ
Fj&mt=1417112660&sver=3&expire=1417134340&ratebypass=yes'
Traceback (most recent call last):
File "main.py", line 19, in
File "youtube_dl__init__.pyo", line 355, in main
File "youtube_dl__init__.pyo", line 345, in _real_main
File "youtube_dl\YoutubeDL.pyo", line 1117, in download
File "youtube_dl\YoutubeDL.pyo", line 564, in extract_info
File "youtube_dl\YoutubeDL.pyo", line 694, in process_ie_result
File "youtube_dl\YoutubeDL.pyo", line 617, in process_ie_result
File "youtube_dl\YoutubeDL.pyo", line 564, in extract_info
File "youtube_dl\YoutubeDL.pyo", line 610, in process_ie_result
File "youtube_dl\YoutubeDL.pyo", line 893, in process_video_result
File "youtube_dl\YoutubeDL.pyo", line 1087, in process_info
File "youtube_dl\YoutubeDL.pyo", line 1063, in dl
File "youtube_dl\downloader\common.pyo", line 294, in download
File "youtube_dl\downloader\http.pyo", line 151, in real_download
File "youtube_dl\utils.pyo", line 244, in sanitize_open
File "ntpath.pyo", line 64, in join
File "ntpath.pyo", line 114, in splitdrive
TypeError: object of type 'generator' has no len()

c:>

Originally created by @wolfman1360 on GitHub (Nov 27, 2014). Hello there, I am getting the following output when attempting to download certain youtube channels. This is an example of one of them. Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\Tyler>cd c:\ c:>youtube-dl --verbose http://www.youtube.com/user/TheWreckingYard/videos -o y outube/%(uploader)s/%(autonumber)s-%(title)s-%(upload_date)s.%(ext)s -f 18 [debug] System config: [] [debug] User config: [] [debug] Command-line args: ['--verbose', 'http://www.youtube.com/user/TheWreckin gYard/videos', '-o', 'youtube/%(uploader)s/%(autonumber)s-%(title)s-%(upload_dat e)s.%(ext)s', '-f', '18'] [debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252 [debug] youtube-dl version 2014.11.27 [debug] Python version 2.7.8 - Windows-7-6.1.7601-SP1 [debug] exe versions: ffmpeg N-67731-, ffprobe N-67731- [debug] Proxy map: {} [download] Downloading playlist: TheWreckingYard [youtube:user] TheWreckingYard: Downloading video ids from 1 to 51 [youtube:user] TheWreckingYard: Downloading video ids from 51 to 101 [youtube:user] TheWreckingYard: Downloading video ids from 101 to 151 [youtube:user] TheWreckingYard: Downloading video ids from 151 to 201 [youtube:user] TheWreckingYard: Downloading video ids from 201 to 251 [youtube:user] TheWreckingYard: Downloading video ids from 251 to 301 [youtube:user] TheWreckingYard: Downloading video ids from 301 to 351 [youtube:user] TheWreckingYard: Downloading video ids from 351 to 401 [youtube:user] TheWreckingYard: Downloading video ids from 401 to 451 [youtube:user] TheWreckingYard: Downloading video ids from 451 to 501 [youtube:user] TheWreckingYard: Downloading video ids from 501 to 551 [youtube:user] TheWreckingYard: Downloading video ids from 551 to 601 [youtube:user] playlist TheWreckingYard: Downloading 599 videos [download] Downloading video #1 of 599 [youtube] Confirming age [youtube] JJGDWpLznoo: Downloading webpage [youtube] JJGDWpLznoo: Downloading video info webpage [youtube] JJGDWpLznoo: Extracting video information [youtube] JJGDWpLznoo: Downloading DASH manifest [debug] Invoking downloader on u'https://r2---sn-5aanugx5h-tfbe.googlevideo.com/ videoplayback?ipbits=0&mm=31&initcwndbps=1187500&itag=18&ms=au&source=youtube&mv =m&dur=75.627&key=yt5&upn=G77TtW-loFo&sparams=dur%2Cid%2Cinitcwndbps%2Cip%2Cipbi ts%2Citag%2Cmm%2Cms%2Cmv%2Crequiressl%2Csource%2Cupn%2Cexpire&signature=EC53AE4F D3D17603441AB3084960E0DEF15A6A8A.A87DD8E8A7E0A677F5C2B6BB70AD5FDBC31E57C6&ip=207 .161.242.186&requiressl=yes&fexp=901496%2C907259%2C923349%2C927622%2C931349%2C93 2404%2C943909%2C947209%2C948124%2C949423%2C952302%2C952605%2C952901%2C953803%2C9 53912%2C957103%2C957105%2C957201&id=o-AIIcYbIK0oJ_Ixi0Ksokmi7T-nUGQzEOLE0c-lZyjJ Fj&mt=1417112660&sver=3&expire=1417134340&ratebypass=yes' Traceback (most recent call last): File "**main**.py", line 19, in <module> File "youtube_dl__init__.pyo", line 355, in main File "youtube_dl__init__.pyo", line 345, in _real_main File "youtube_dl\YoutubeDL.pyo", line 1117, in download File "youtube_dl\YoutubeDL.pyo", line 564, in extract_info File "youtube_dl\YoutubeDL.pyo", line 694, in process_ie_result File "youtube_dl\YoutubeDL.pyo", line 617, in process_ie_result File "youtube_dl\YoutubeDL.pyo", line 564, in extract_info File "youtube_dl\YoutubeDL.pyo", line 610, in process_ie_result File "youtube_dl\YoutubeDL.pyo", line 893, in process_video_result File "youtube_dl\YoutubeDL.pyo", line 1087, in process_info File "youtube_dl\YoutubeDL.pyo", line 1063, in dl File "youtube_dl\downloader\common.pyo", line 294, in download File "youtube_dl\downloader\http.pyo", line 151, in real_download File "youtube_dl\utils.pyo", line 244, in sanitize_open File "ntpath.pyo", line 64, in join File "ntpath.pyo", line 114, in splitdrive TypeError: object of type 'generator' has no len() c:>
Author
Owner

@jaimeMF commented on GitHub (Nov 27, 2014):

The problem is that we call os.path.join with a generator (on OS X it will return a generator). I think it should be:

alt_filename = os.path.join(
    *[re.sub('[/<>:"\\|\\\\?\\*]', '#', path_part)
    for path_part in os.path.split(filename)]
)

By the way, @phihag [in line 250] shouldn't we call open(encodeFilename(alt_filename), open_mode)?

@jaimeMF commented on GitHub (Nov 27, 2014): The problem is that we [call `os.path.join` with a generator](https://github.com/rg3/youtube-dl/blob/ab4ee31eb15842a2f100bf618579422d3604f03c/youtube_dl/utils.py#L242) (on OS X it will return a generator). I think it should be: ``` python alt_filename = os.path.join( *[re.sub('[/<>:"\\|\\\\?\\*]', '#', path_part) for path_part in os.path.split(filename)] ) ``` By the way, @phihag [in line 250] shouldn't we call `open(encodeFilename(alt_filename), open_mode)`?
Author
Owner

@Bobb-E-Burns commented on GitHub (Feb 15, 2015):

I'm getting almost the exact same issue on the latest windows build (2015.02.11) as well, only thing that is different are the line numbers

@Bobb-E-Burns commented on GitHub (Feb 15, 2015): I'm getting almost the exact same issue on the latest windows build (2015.02.11) as well, only thing that is different are the line numbers
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#3549
No description provided.