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

[DeviantArt] KeyError - 'category' #5961

Closed
smaybius opened this issue Aug 7, 2024 · 4 comments
Closed

[DeviantArt] KeyError - 'category' #5961

smaybius opened this issue Aug 7, 2024 · 4 comments

Comments

@smaybius
Copy link

smaybius commented Aug 7, 2024

PS> gallery-dl -o original=false --filter "print(url)" https://www.deviantart.com/mileymouse/gallery/all --verbose
[gallery-dl][debug] Version 1.27.2
[gallery-dl][debug] Python 3.12.2 - Windows-11-10.0.22631-SP0
[gallery-dl][debug] requests 2.31.0 - urllib3 2.1.0
[gallery-dl][debug] Configuration Files ['%USERPROFILE%\\gallery-dl.conf']
[gallery-dl][debug] Starting DownloadJob for 'https://www.deviantart.com/mileymouse/gallery/all'
[deviantart][debug] Using DeviantartGalleryExtractor for 'https://www.deviantart.com/mileymouse/gallery/all'
[deviantart][debug] Using custom API credentials (client-id 22444)
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.deviantart.com:443
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/user/profile/mileymouse HTTP/1.1" 200 382
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/gallery/all?username=MileyMouse&offset=0&limit=24&mature_content=true HTTP/1.1" 200 None
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/deviation/metadata?deviationids%5B0%5D=FCB69C08-855D-0B89-59CF-5CBA8D9B1E8C&deviationids%5B1%5D=B6F1416F-C4B0-6CB6-096A-C84217EB696D&deviationids%5B2%5D=D16C7DD8-C63C-53C8-0ABB-724270AB41A8&deviationids%5B3%5D=D0580710-BA3C-4253-F6BF-E14AEA662F31&deviationids%5B4%5D=499222D2-6B8D-4CD8-F954-8924888D9BDE&deviationids%5B5%5D=A27F9C78-D497-19AD-1A09-589962A4FFE5&deviationids%5B6%5D=F8AE114E-5AA2-CFD5-2902-0EF6E7CC5ADE&deviationids%5B7%5D=44570F7A-C2E8-4648-F5B0-67354CB34E0A&deviationids%5B8%5D=6DA8B866-191D-4366-BB0C-6C32193FBECE&deviationids%5B9%5D=908F1EB5-190C-13B8-38EC-CBC5AD0F21C3&deviationids%5B10%5D=3BE7F88B-64F7-DFF8-1096-EF41F47546BF&deviationids%5B11%5D=54361EF0-E94D-735D-3CD2-6F744DF72550&deviationids%5B12%5D=5F3B1938-D3CF-F720-D740-A3E479ED439F&deviationids%5B13%5D=11E73F73-EA6B-D616-7CFA-C26BB37481F1&deviationids%5B14%5D=7198BB7A-A4AB-F998-44DE-A32B3F19C3A8&deviationids%5B15%5D=FAEF4541-9DE9-4C6B-7E35-B43E82006A62&deviationids%5B16%5D=EC58D8AE-5EC5-636D-519C-EE66ACA7077A&deviationids%5B17%5D=BD601E0D-FA85-6E2F-1EF7-1E49B8387990&deviationids%5B18%5D=0D2168C8-0B79-F08A-EBF0-6DD254AFB571&deviationids%5B19%5D=EA2F506E-2F53-EEC0-9CFF-0EE22569777F&deviationids%5B20%5D=753AEA58-698F-EA6B-D7DC-22A0F04F679D&deviationids%5B21%5D=61CB6C9B-ABD7-4D45-14CD-AD898A55B02E&deviationids%5B22%5D=92008C9E-DCF3-E157-C3C9-3BAC7D7C696C&deviationids%5B23%5D=9A03178A-A53E-881E-30C4-34E65071581F&mature_content=true HTTP/1.1" 200 6786
[deviantart][error] An unexpected error occurred: KeyError - 'category'. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[deviantart][debug]
Traceback (most recent call last):
  File "C:\Program Files\Python312\Lib\site-packages\gallery_dl\job.py", line 151, in run
    for msg in extractor:
  File "C:\Program Files\Python312\Lib\site-packages\gallery_dl\extractor\deviantart.py", line 150, in items
    self.prepare(deviation)
  File "C:\Program Files\Python312\Lib\site-packages\gallery_dl\extractor\deviantart.py", line 249, in prepare
    deviation["da_category"] = deviation["category"]
                               ~~~~~~~~~^^^^^^^^^^^^
KeyError: 'category'

I even updated to the latest version of gallery-dl.

@defaultd3f4lt
Copy link

i also experiencing it just now

mikf added a commit that referenced this issue Aug 8, 2024
'deviation' objects returned by the OAuth API no longer include a
'category' or 'category_path' value.
@mikf mikf pinned this issue Aug 8, 2024
@mikf
Copy link
Owner

mikf commented Aug 8, 2024

Should be fixed with 269b280

DA removed both category and category_path from its API responses.

@jojo2833432
Copy link

so is there a solution to this? or would we need to wait for a bit?

@mikf
Copy link
Owner

mikf commented Aug 10, 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

4 participants