Last modified: 2013-12-04 10:10:26 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T59531, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 57531 - internal_api_error_MWException on test.wikidata.org
internal_api_error_MWException on test.wikidata.org
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
master
All All
: Unprioritized blocker (vote)
: ---
Assigned To: Wikidata bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-25 11:07 UTC by Lydia Pintscher
Modified: 2013-12-04 10:10 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Lydia Pintscher 2013-11-25 11:07:24 UTC
(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)
Comment 1 Addshore 2013-11-25 11:42:55 UTC
Which API module was used?
Comment 2 ValterVB 2013-11-25 18:55:03 UTC
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)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links