-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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] An unexpected error occurred: KeyError - 'deviation'. #6254
Comments
I am having a similar error with DeviantArt; my KeyError is 'category'.
|
You didn't, don't worry. If anything it was the DA devs who broke their API and caused the empty journal/status/literature issue to begin with, and me who implemented a bad and buggy workaround for it (#6196, #6207). There is currently no fix. You could revert to v1.27.4 to get rid of the exception, but the downloaded literature items would all be empty.
You are using an outdated version. This was fixed in v1.27.3 (269b280) |
Never mind, found the problem: gallery-dl/gallery_dl/extractor/deviantart.py Line 188 in f3f2749
This needs to be "art" or DA complains:
{
"error": "invalid_request",
"errorDescription": "Unknown user/deviationid combination.",
"errorCode": 404,
"status": "error"
} |
Wow, congrats! I'm using the version directly from the GitHub using the Pip installation. Is there a way to update this myself or I will have to wait until the next update? Thanks in advance and I hope this isn't a dumb question |
Thanks for the fix! I tested with 2 different accounts and they both worked like a charm! <3 |
The solution from 7dbd53e (get journal/literature HTML directly from webpage) should be better and more accurate than the previous |
@mikf I think paywalled literature might still be affected by this. Do you have an idea what might be the issue here? Otherwise I will try to debug this myself, as this will hard to reproduce, if you don't have access to paid literature yourself.
|
You'd theoretically need to pass logged in cookies to be able to access paywalled literature, but you currently can't as cookies are generally disabled for OAuth sites including DA:
(Removing this line allows cookies) |
Thanks that fixed it for me |
Hii! I'm using gallery-dl for over a year now, but since the 1.27.5 update, I'm having trouble downloading some literature labeled texts/fanfics from Deviantart. I hope I did nothing wrong. Here are the debugging information:
[gallery-dl][debug] Version 1.27.5
[gallery-dl][debug] Python 3.10.4 - Windows-10-10.0.22631-SP0
[gallery-dl][debug] requests 2.31.0 - urllib3 2.0.7
[gallery-dl][debug] Configuration Files ['%APPDATA%\gallery-dl\config.json']
[gallery-dl][debug] Starting DownloadJob for 'https://www.deviantart.com/starvinglunatic/art/Against-the-world-chapter-1-50968347'
[deviantart][debug] Using DeviantartDeviationExtractor for 'https://www.deviantart.com/starvinglunatic/art/Against-the-world-chapter-1-50968347'
[deviantart][debug] Using custom API credentials (client-id 29899)
[deviantart][info] Requesting public access token
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): www.deviantart.com:443
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "POST /oauth2/token HTTP/1.1" 200 126
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/user/profile/starvinglunatic HTTP/1.1" 200 390
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /StarvingLunatic/art/50968347 HTTP/1.1" 200 None
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/deviation/016057D5-33D2-EC3D-D242-0E9DCF39368A HTTP/1.1" 200 818
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/deviation/metadata?deviationids%5B0%5D=016057D5-33D2-EC3D-D242-0E9DCF39368A&mature_content=true HTTP/1.1" 200 936
[deviantart][info] Collecting folder information for 'StarvingLunatic'
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/gallery/folders?username=StarvingLunatic&offset=0&limit=50&mature_content=true HTTP/1.1" 200 5920
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/gallery/50619809-A51F-09B2-C01C-EAD5CCA7D6BE?username=StarvingLunatic&offset=0&limit=24&mature_content=true&mode=newest HTTP/1.1" 200 None
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/gallery/50619809-A51F-09B2-C01C-EAD5CCA7D6BE?username=StarvingLunatic&offset=24&limit=24&mature_content=true&mode=newest HTTP/1.1" 200 None
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/gallery/50619809-A51F-09B2-C01C-EAD5CCA7D6BE?username=StarvingLunatic&offset=48&limit=24&mature_content=true&mode=newest HTTP/1.1" 200 None
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/gallery/50619809-A51F-09B2-C01C-EAD5CCA7D6BE?username=StarvingLunatic&offset=72&limit=24&mature_content=true&mode=newest HTTP/1.1" 200 None
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/gallery/50619809-A51F-09B2-C01C-EAD5CCA7D6BE?username=StarvingLunatic&offset=96&limit=24&mature_content=true&mode=newest HTTP/1.1" 200 None
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/gallery/F3EF72FC-51E3-8CEB-083B-258D6C414FC6?username=StarvingLunatic&offset=0&limit=24&mature_content=true&mode=newest HTTP/1.1" 200 None
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/gallery/F3EF72FC-51E3-8CEB-083B-258D6C414FC6?username=StarvingLunatic&offset=24&limit=24&mature_content=true&mode=newest HTTP/1.1" 200 3035
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/gallery/F097CA37-DD8F-C43D-C2E0-72A3818309D6?username=StarvingLunatic&offset=0&limit=24&mature_content=true&mode=newest HTTP/1.1" 200 2929
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/gallery/425DD360-D28F-F5A1-76CA-C12D689B5334?username=StarvingLunatic&offset=0&limit=24&mature_content=true&mode=newest HTTP/1.1" 200 4664
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/gallery/7D26849B-B1F3-11F6-037B-94C1E401517B?username=StarvingLunatic&offset=0&limit=24&mature_content=true&mode=newest HTTP/1.1" 200 5006
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/gallery/8E72B18C-CE61-9EA9-121F-9DB5ED29895B?username=StarvingLunatic&offset=0&limit=24&mature_content=true&mode=newest HTTP/1.1" 200 1708
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/gallery/E9F0DC3B-6A44-AA53-9627-5AC5679D082E?username=StarvingLunatic&offset=0&limit=24&mature_content=true&mode=newest HTTP/1.1" 200 4028
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/gallery/60246A9F-71FD-8EDC-F48B-B203A2164613?username=StarvingLunatic&offset=0&limit=24&mature_content=true&mode=newest HTTP/1.1" 200 None
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/gallery/61AE6FFD-72C5-BD25-2E14-2F3E09A15DBC?username=StarvingLunatic&offset=0&limit=24&mature_content=true&mode=newest HTTP/1.1" 200 4591
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/gallery/F2BCC72F-2341-3114-F2C2-E13EC2669938?username=StarvingLunatic&offset=0&limit=24&mature_content=true&mode=newest HTTP/1.1" 200 3598
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/gallery/A4BD78D5-3C92-B73C-E5DA-94086806DFAC?username=StarvingLunatic&offset=0&limit=24&mature_content=true&mode=newest HTTP/1.1" 200 3529
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /api/v1/oauth2/comments/deviation/016057D5-33D2-EC3D-D242-0E9DCF39368A?maxdepth=5&offset=0&limit=50&mature_content=true HTTP/1.1" 200 1340
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET / HTTP/1.1" 200 None
[deviantart][debug] Sleeping 2.00 seconds (request)
[urllib3.connectionpool][debug] https://www.deviantart.com:443 "GET /_puppy/dadeviation/init?deviationid=50968347&username=StarvingLunatic&type=journal&include_session=false&expand=deviation.related&da_minor_version=20230710&csrf_token=NS3h3x8dLZW5ODct.sklnfk.JUdnAfMtfmv5xVaWEcoMG9wxPvNmDb0aD4NZVInzMBA HTTP/1.1" 400 118
[deviantart][error] An unexpected error occurred: KeyError - 'deviation'. 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:\Users\klaiu\AppData\Local\Programs\Python\Python310\lib\site-packages\gallery_dl\job.py", line 151, in run
for msg in extractor:
File "C:\Users\klaiu\AppData\Local\Programs\Python\Python310\lib\site-packages\gallery_dl\extractor\deviantart.py", line 185, in items
content = self.eclipse_api.deviation_extended_fetch(
KeyError: 'deviation'
The text was updated successfully, but these errors were encountered: