Page MenuHomePhabricator

internal_api_error_MWException on test.wikidata.org
Closed, ResolvedPublic

Description

(copied from https://www.wikidata.org/wiki/Wikidata:Contact_the_development_team#internal_api_error_MWException_on_test.wikidata.org)

I tried to add quantity to a property with bot but I have error: <error code="internal_api_error_MWException" info="Exception Caught: Internal error in ApiFormatXml::recXmlPrint: (P10, ...) has integer keys without _element value. Use ApiResult::setIndexedTagName()." xml:space="preserve" />. This is the claim that I want add:
{

"claims" : [{
                "mainsnak" : {
                        "snaktype" : "value",
                        "property" : "P69",
                        "datavalue" : {
                                "value" : {
                                        "amount" : "+1000",
                                        "unit" : "1",
                                        "upperBound" : "+1001",
                                        "lowerBound" : "+999"
                                },
                                "type" : "quantity"
                        }
                },
                "type" : "statement",
                "rank" : "normal"
        }
]

}

My error or some problem in API? --ValterVB (talk) 10:41, 23 November 2013 (UTC)
However the claim is recorded in database. --ValterVB (talk) 09:31, 24 November 2013 (UTC)


Version: master
Severity: blocker

Details

Reference
bz57531

Related Objects

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:15 AM
bzimport set Reference to bz57531.
bzimport added a subscriber: Unknown Object (MLST).

Tested now: URL:https://test.wikidata.org/w/api.php?action=wbeditentity&format=xmlPOST data (plain text): id=Q14&token=0e74ef4d1a37aca646b8cadcbf44d12d+\&bot=bot&data={"claims":[{"mainsnak":{"snaktype":"value","property":"P69","datavalue":{"value":{"amount":"+0","unit":"+0", "upperBound":"+0", "lowerBound":"+0"},"type":"quantity"}},"type":"statement","rank":"normal"}]}&summary=Bot:Test quantityPOST data (encoded): id=Q14&token=0e74ef4d1a37aca646b8cadcbf44d12d%2b%5c&bot=bot&data=%7b%22claims%22%3a%5b%7b%22mainsnak%22%3a%7b%22snaktype%22%3a%22value%22%2c%22property%22%3a%22P69%22%2c%22datavalue%22%3a%7b%22value%22%3a%7b%22amount%22%3a%22%2b0%22%2c%22unit%22%3a%22%2b0%22%2c+%22upperBound%22%3a%22%2b0%22%2c+%22lowerBound%22%3a%22%2b0%22%7d%2c%22type%22%3a%22quantity%22%7d%7d%2c%22type%22%3a%22statement%22%2c%22rank%22%3a%22normal%22%7d%5d%7d&summary=Bot%3aTest+quantity --ValterVB (A) (Discussione) 18:53, 25 November 2013 (UTC)