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

500px errors again... #1573

Closed
IceBlackwell opened this issue May 22, 2021 · 2 comments
Closed

500px errors again... #1573

IceBlackwell opened this issue May 22, 2021 · 2 comments

Comments

@IceBlackwell
Copy link

[gallery-dl] Python 3.6.9 - Linux-4.15.0-122-generic-x86_64-with-LinuxMint-19-tara
[gallery-dl] requests 2.18.4 - urllib3 1.22
[gallery-dl] Starting DownloadJob for 'https://500px.com/p/dariodu31/galleries/outdoor'
[500px] Using _500pxGalleryExtractor for 'https://500px.com/p/dariodu31/galleries/outdoor'
[urllib3.connectionpool] Starting new HTTPS connection (1): api.500px.com
[urllib3.connectionpool] https://api.500px.com:443 "GET /graphql?operationName=ProfileRendererQuery&variables=%7B%22username%22%3A+%22dariodu31%22%7D&extensions=%7B%22persistedQuery%22%3A%7B%22version%22%3A1%2C%22sha256Hash%22%3A%22fcecc7028c308115b0defebc63acec3fe3c12df86a602c3e1785ba5cfb8fff47%22%7D%7D HTTP/1.1" 200 1696
[urllib3.connectionpool] https://api.500px.com:443 "GET /graphql?operationName=GalleriesDetailQueryRendererQuery&variables=%7B%22galleryOwnerLegacyId%22%3A+%2271836251%22%2C+%22ownerLegacyId%22%3A+%2271836251%22%2C+%22slug%22%3A+%22outdoor%22%2C+%22token%22%3A+null%2C+%22pageSize%22%3A+20%7D&extensions=%7B%22persistedQuery%22%3A%7B%22version%22%3A1%2C%22sha256Hash%22%3A%2299a48f93f632338800f26cdacc43a0e4881d610a68e6aab577648c2a9b61e4a9%22%7D%7D HTTP/1.1" 200 100
[500px] An unexpected error occurred: KeyError - 'data'. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[500px] 
Traceback (most recent call last):
  File "/mnt/graphics/piclib/pictures1/gallery_dl-py3/gallery_dl/job.py", line 77, in run
    for msg in self.extractor:
  File "/mnt/graphics/piclib/pictures1/gallery_dl-py3/gallery_dl/extractor/500px.py", line 32, in items
    data = self.metadata()
  File "/mnt/graphics/piclib/pictures1/gallery_dl-py3/gallery_dl/extractor/500px.py", line 175, in metadata
    "99a48f93f632338800f26cdacc43a0e4881d610a68e6aab577648c2a9b61e4a9",
  File "/mnt/graphics/piclib/pictures1/gallery_dl-py3/gallery_dl/extractor/500px.py", line 89, in _request_graphql
    return self.request(url, params=params).json()["data"]
KeyError: 'data'

Such errors still appears randomly and without visible causes. Maybe it will be better if gallery-dl does not stop, but just wait a pause and retry?

@mikf
Copy link
Owner

mikf commented May 22, 2021

Should be fixed in d7bc4a2.
Retrying the same API call usually doesn't help here, only updating the GraphQL query hashes seens to work and for gallery-related calls this needs to happen rather often compared to the ones for user profiles.

@IceBlackwell
Copy link
Author

Thanks, I just changed those hashes in 500px.py, and now it works fine.

@mikf mikf closed this as completed Jun 19, 2021
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