magnusmanske / listeria_rs

Repo for the Wikimedia Listeria bot
https://listeria.toolforge.org/
23 stars 6 forks source link

Error decoding response body on manual update #59

Closed Nono314 closed 1 week ago

Nono314 commented 3 years ago

Sorry @magnusmanske , but I don't think #46 is fixed.

I can see several refreshes (probably by you) at https://www.wikidata.org/wiki/Wikidata:WikiProject_sum_of_all_paintings/Top_creators_by_number_of_collections and can understand why you thought it was fixed but this was because another user in the meantime reduced the features of the list to have it updated.

The same error is still to be seen on https://www.wikidata.org/wiki/Wikidata:WikiProject_sum_of_all_paintings/Top_female_creators_by_number_of_catalogued_paintings for example, with that error message of Last line: ERROR: String("error decoding response body: expected value at line 1 column 1") The list there is smallish but nonetheless never successfully updated with Listeria V2. I suspect it may be linked to the output of wikitext (link to list), as it seems to affect those SOAP tables with links to collections or creators, and the above mentioned edit that seemed to have "fixed" the list was removing the wikilink. Maybe the brackets are not correctly escaped and break the json syntax parser in some way?

jmreymond commented 3 years ago

same issue yesterday at https://fr.wikipedia.org/wiki/Utilisateur%3AJmax%2Fanniversaires

BraveheartWikimedia commented 3 years ago

I get the same thing for lists like https://de.wikipedia.org/wiki/Benutzer%3ABraveheart%2FListe_der_TKK-Objekte_im_Bezirk_Kitzb%C3%BChel - haven't figured out what the difference to other lists is, except that an upload link is generated for the table.

BraveheartWikimedia commented 3 years ago

So playing around with the format of the query revealed that the brackets in the query do indeed cause this error, i.e. there is an issue in the json-file that doesn't escape [ and ] .

jmreymond commented 3 years ago

same issue with https://listeria.toolforge.org/index.php?action=update&lang=fr&page=Projet:Wikidata/Listes/Anniversaire_aujourd%27hui

Daniel-Mietchen commented 2 years ago

Same issue at here, even after fixing pipe and bracket characters.

magnusmanske commented 1 week ago

So the issue on https://www.wikidata.org/wiki/User:Daniel_Mietchen/Wikidata_lists/Items_that_have_a_Global_Invasive_Species_Database_ID_(P5626)_or_a_Invasive_Species_Compendium_Datasheet_ID_(P5698) is/was that the {{Scholia-inline}} and {{!}} templates got replaced before Listeria submitted it to SPARQL. That resulted in some unescaped double quotes within a double-quoted string, which caused the SPARQL query to fail.

I have "fixed" the issue by splitting the string in the CONCAT, so template replacement won't happen. But now the result is a template link, instead of a template replacement. Not sure how to do that, but at least the "decoding response body" is fixed.