Derpibooru-dl Stopped working, possible change in how API results are returned?

abcdh
Not a Llama - Happy April Fools Day!

đŸ…±
Around 3/2/18 (but perhaps earlier by up to a week, as a week prior around 2/24 was the last time I had ran it successfully), The Derpibooru-dl script appears to have stopped working during the searching stage  
https://github.com/woodenphone/Derpibooru-dl/issues/33
 
eg
 
2018-03-05 19:29:31,773 - DEBUG - https://derpibooru.org:443 “GET /search.json?perpage=50&page=11&q=artist3Alumineko&key=11111111111111111111&filter_id=&sf=created_at&sd=desc HTTP/1.1” 200 None  
2018-03-05 19:29:31,835 - DEBUG - Starting new HTTPS connection (1): derpibooru.org  
2018-03-05 19:29:32,164 - DEBUG - https://derpibooru.org:443 “GET /search.json?perpage=50&page=12&q=artist
3Alumineko&key=11111111111111111111&filter_id=&sf=created_at&sd=desc HTTP/1.1” 200 None  
2018-03-05 19:29:32,210 - CRITICAL - Unhandled exception!  
2018-03-05 19:29:32,210 - CRITICAL - <type ‘exceptions.AttributeError’>  
2018-03-05 19:29:32,210 - ERROR - can’t set attribute
 
 
Were there any known changes to the format that the API returns around that time? Mainly trying to get pointed in the right direction to figure out what might of changed to help me in fixing the script. Any insight would be helpful and greatly appreciated if you have it! Thank you.
Joey
Dawnsong - Derpi Supporter
Lunar Supporter - Helped forge New Lunar Republic's freedom in the face of the Solar Empire's oppressive tyrannical regime (April Fools 2023).
Flower Trio - Helped others get their OC into the 2023 Derpibooru Collab.
Roseluck - Had their OC in the 2023 Derpibooru Collab.
A Lovely Nightmare Night - Celebrated the 12th anniversary of MLP:FIM!
Cool Crow - "Caw!" An awesome tagger
Tree of Harmony - Drew someone's OC for the 2022 Community Collab
Elements of Harmony - Had an OC in the 2022 Community Collab
Non-Fungible Trixie -
Verified Pegasus - Show us your gorgeous wings!

PM me your cute OCs
I gotta compliment you for being like the first person to ever post about this script and actually remember to remove your API key from the logs.
 
I’ve had to manually reset a half dozen keys because of people posting about problems with this script.
abcdh
Not a Llama - Happy April Fools Day!

đŸ…±
Just to note here for anybody looking, so far a hack to get the script functional again (as truly fixing it requires a somewhat deep understanding of it that the original author no longer even has and it’s sorta complicated)  
was discovered by ImintA2 in the investigation in the github thread https://github.com/woodenphone/Derpibooru-dl/issues/33:
 
edited line 53 of “lib\site-packages\derpibooru\image.py”
 
def tags(self):  
return self.data[“tags”].split(”, “)  
to
 
def tags(self):  
try:  
return self.data[“tags”].split(”, “)  
except:  
return []
 
 
Obviously, this is just telling the underlying derpibooru library to ignore problems with malformed things from the download script, but it works (in our test cases)! We’ll find some better solutions later for it that feel less hacky, though I haven’t seen any in my usage there might be some unintended consequences.
abcdh
Not a Llama - Happy April Fools Day!

đŸ…±
Basically, Liam is a genius and figured it out right away  
(tags was null for 41758 images).  
no code change necessary, script works again! I think he fixed something on Derpibooru’s end to get rid of the null tags.
 
Other good news, project is in good hands as he has inherited it from the beloved woodenphone as the owner.
 
Cheers all around!
byte[]
Solar Supporter - Fought against the New Lunar Republic rebellion on the side of the Solar Deity (April Fools 2023).
Non-Fungible Trixie -
Verified Pegasus - Show us your gorgeous wings!
Preenhub - We all know what you were up to this evening~
An Artist Who Rocks - 100+ images under their artist tag
Artist -

Philomena Contributor
“Right away” may be an overstatement, I needed to go over the issue twice before I realized what was going wrong on the server
 but yes, it didn’t need a code change to fix it.
Interested in advertising on Derpibooru? Click here for information!
Techy Cutie Pony Collection!

Help fund the $15 daily operational cost of Derpibooru - support us financially!

Syntax quick reference: **bold** *italic* ||hide text|| `code` __underline__ ~~strike~~ ^sup^ %sub%

Detailed syntax guide