mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.7k stars 953 forks source link

Patreon - List Index Out of Bounds #1339

Closed flaccidbagel closed 3 years ago

flaccidbagel commented 3 years ago

Good evening. Attempting to grab the works off a patreon I recently subbed to, and I'm receiving the following error doing so. Not too sure where to go from here.

The config file in question has my session ID filled in as well.

[gallery-dl][debug] Version 1.16.5 [gallery-dl][debug] Python 3.7.9 - Windows-10-10.0.19041 [gallery-dl][debug] requests 2.25.1 - urllib3 1.25.11 [gallery-dl][debug] Starting DownloadJob for 'https://www.patreon.com/Snao' [patreon][debug] Using PatreonCreatorExtractor for 'https://www.patreon.com/Snao' [urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.patreon.com:443 [urllib3.connectionpool][debug] https://www.patreon.com:443 "GET /snao HTTP/1.1" 301 None [urllib3.connectionpool][debug] Starting new HTTP connection (1): www.patreon.com:80 [urllib3.connectionpool][debug] http://www.patreon.com:80 "GET /Snao HTTP/1.1" 301 None [urllib3.connectionpool][debug] https://www.patreon.com:443 "GET /Snao HTTP/1.1" 302 None [urllib3.connectionpool][debug] https://www.patreon.com:443 "GET /Snao/posts HTTP/1.1" 200 None [urllib3.connectionpool][debug] https://www.patreon.com:443 "GET /api/posts?include=user,images,attachments,user_defined_tags,campaign,poll.choices,poll.current_user_responses.user,poll.current_user_responses.choice,poll.current_user_responses.poll,access_rules.tier.null&fields%5Bpost%5D=change_visibility_at,comment_count,content,current_user_can_delete,current_user_can_view,current_user_has_liked,embed,image,is_paid,like_count,min_cents_pledged_to_view,post_file,published_at,patron_count,patreon_url,post_type,pledge_url,thumbnail_url,teaser_text,title,upgrade_url,url,was_posted_by_campaign_owner&fields%5Buser%5D=image_url,full_name,url&fields%5Bcampaign%5D=avatar_photo_url,earnings_visibility,is_nsfw,is_monthly,name,url&fields%5Baccess_rule%5D=access_rule_type,amount_cents&sort=-published_at&filter%5Bis_draft%5D=false&filter%5Bcontains_exclusive_posts%5D=true&filter%5Bcampaign_id%5D=163936&json-api-use-default-includes=false&json-api-version=1.0 HTTP/1.1" 200 None [urllib3.connectionpool][debug] https://www.patreon.com:443 "GET /api/user/99423 HTTP/1.1" 200 None [patreon][error] An unexpected error occurred: IndexError - string index out of range. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues . [patreon][debug] Traceback (most recent call last): File "gallery_dl\job.py", line 69, in run File "gallery_dl\job.py", line 107, in dispatch File "gallery_dl\job.py", line 276, in handle_directory File "gallery_dl\job.py", line 372, in initialize File "gallery_dl\util.py", line 769, in init IndexError: string index out of range

mikf commented 3 years ago

File "gallery_dl\util.py", line 769 points to https://github.com/mikf/gallery-dl/blob/6e40585fb1f421db9218e9242c0f3c36769e4de5/gallery_dl/util.py#L769

This crashes if your base-directory setting is an empty string "". If that's the case for you, changing it to "." will fix it, as will https://github.com/mikf/gallery-dl/commit/92071d02f4b05a5a819c5fd243d8d4b0d97a8a1b

flaccidbagel commented 3 years ago

Thanks for the info. That took care of it.