arthurpsmith / author-disambiguator

Wikidata service to help create or link author items to published articles
GNU General Public License v3.0
33 stars 8 forks source link

work_item_oauth.php fails when an author is "unknown value" #186

Open wafflefin opened 1 year ago

wafflefin commented 1 year ago

When I try to view article Q57837286 at https://author-disambiguator.toolforge.org/work_item_oauth.php?id=Q57837286 it errors out.

The error message is: JSON decode failed! {"error":{"code":"no-such-entity","info":"Could not find an entity with the ID \"Q31260769820788048027\".","id":"Q31260769820788048027","messages":[{"name":"wikibase-api-no-such-entity","parameters":["Q31260769820788048027"],"html":{"*":"Could not find an entity with the ID \"Q31260769820788048027\"."}}],"*":"See https://www.wikidata.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes."},"servedby":"mw1382"}

arthurpsmith commented 1 year ago

@wafflefin - looks like the problem was with an "unknown value" for author. I need to catch that somehow - thanks for spotting it! In the meantime I edited this item to remove the "unknown value" so you can work on it if you like.

arthurpsmith commented 1 month ago

FYI I started work on a fix to this but it is excessively complex. It may need some rethinking.