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

[piczel] KeyError when extracting galleries #6735

Closed
smlanger opened this issue Dec 26, 2024 · 0 comments
Closed

[piczel] KeyError when extracting galleries #6735

smlanger opened this issue Dec 26, 2024 · 0 comments

Comments

@smlanger
Copy link

Starting on 18.12.2024 my daily gallery downloads are throwing errors for piczel galleries.

for example:

XXX@librorum ~/Programs/scripts/gallery-dl/temp $ gallery-dl -K --no-colors --verbose https://piczel.tv/gallery/Luxar92
[gallery-dl][debug] Version 1.28.2
[gallery-dl][debug] Python 3.12.8 - Linux-6.6.67-gentoo-x86_64-AMD_Ryzen_5_PRO_5650GE_with_Radeon_Graphics-with-glibc2.40
[gallery-dl][debug] requests 2.32.3 - urllib3 2.2.3
[gallery-dl][debug] Configuration Files []
[gallery-dl][debug] Starting KeywordJob for 'https://piczel.tv/gallery/Luxar92'
[piczel][debug] Using PiczelUserExtractor for 'https://piczel.tv/gallery/Luxar92'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): piczel.tv:443
[urllib3.connectionpool][debug] https://piczel.tv:443 "GET /api/users/Luxar92/gallery HTTP/11" 200 None
[piczel][error] An unexpected error occurred: KeyError - -1. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[piczel][debug] 
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/gallery_dl/job.py", line 152, in run
    for msg in extractor:
               ^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/gallery_dl/extractor/piczel.py", line 25, in items
    for post in self.posts():
                ^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/gallery_dl/extractor/piczel.py", line 60, in _pagination
    params["from_id"] = data[-1]["id"]
                        ~~~~^^^^
KeyError: -1

extraction works properly for single images:

XXX@librorum ~/Programs/scripts/gallery-dl/temp $ gallery-dl -K --no-colors --verbose https://piczel.tv/gallery/image/92227
[gallery-dl][debug] Version 1.28.2
[gallery-dl][debug] Python 3.12.8 - Linux-6.6.67-gentoo-x86_64-AMD_Ryzen_5_PRO_5650GE_with_Radeon_Graphics-with-glibc2.40
[gallery-dl][debug] requests 2.32.3 - urllib3 2.2.3
[gallery-dl][debug] Configuration Files []
[gallery-dl][debug] Starting KeywordJob for 'https://piczel.tv/gallery/image/92227'
[piczel][debug] Using PiczelImageExtractor for 'https://piczel.tv/gallery/image/92227'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): piczel.tv:443
[urllib3.connectionpool][debug] https://piczel.tv:443 "GET /api/gallery/92227 HTTP/11" 200 7036
Keywords for directory names:
-----------------------------
category
  piczel
created_at
  2024-07-30T03:47:44.000Z
curated
  True
date
  2024-07-30 03:47:44
description
  A redraw of a sailor moon screenshot. <a href="https://x.com/Luxar92/status/1817071418049278180">https://x.com/Luxar92/status/1817071418049278180</a><br /><br /><p><a href="http://www.postybirb.com">Posted using PostyBirb</a></p>
favorites_count
  8
folder_id
  81
height
  None
id
  92227
image['large']['url']
  https://piczel.tv/static/uploads/gallery_image/67/image/92227/large_1722311264-Luxar92.jpeg
*snip*

Errors started using v1.28.1 but the update to that version was done over a week before.

mikf added a commit that referenced this issue Dec 27, 2024
- fix pagination
- update API endpoints
- provide 'count' metadata field
- use BASE_PATTERN and self.groups[…]
@mikf mikf closed this as completed Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants