I am encountering an error using the API

+5 votes

I have written a python module to use the WikiTree API. Retrieving results in JSON format works well, but fails for XML format. The following URL will illustrate the problem (This link opens on a new tab or window.) It does not require an api login.


I get the following error message:

<?xml version="1.0" encoding="utf-8"?>
  <error code="internal_api_error" info="Exception Caught: Internal error in ApiFormatXml::recXmlPrint: (api, ...) has integer keys without _element value. Use ApiResult::setIndexedTagName().">

#0 /home/wikitree/www/includes/api/ApiBase.php(508): wfDebugDieBacktrace('Internal error ...')
#1 /home/wikitree/www/includes/api/ApiFormatXml.php(110): ApiBase::dieDebug('ApiFormatXml::r...', '(api, ...) has ...')
#2 /home/wikitree/www/includes/api/ApiFormatXml.php(56): ApiFormatXml-&gt;recXmlPrint('api', Array, -2)
#3 /home/wikitree/www/includes/api/ApiMain.php(340): ApiFormatXml-&gt;execute()
#4 /home/wikitree/www/includes/api/ApiMain.php(329): ApiMain-&gt;printResult(false)
#5 /home/wikitree/www/includes/api/ApiMain.php(210): ApiMain-&gt;executeAction()
#6 /home/wikitree/www/includes/api/ApiMain.php(195): ApiMain-&gt;executeActionWithErrorHandling()
#7 /home/wikitree/www/api.php(53): ApiMain-&gt;execute()
#8 {main}


The above is a little more readable when you follow the URL above. Remove the "&format=xmlfm" to see that this query returns valid JSON.

Could someone have a look to see if this can be repaired.



in WikiTree Tech by Doug Henderson G2G6 (8.8k points)
There's an API?

1 Answer

0 votes
Hi Doug,

For your application, do you need both the JSON and the XML?

I'm wondering if the XML is really necessary.


by Chris Whitten G2G Astronaut (1.3m points)

Related questions

+6 votes
1 answer
+4 votes
2 answers
+6 votes
3 answers
108 views asked Sep 28 in WikiTree Tech by Przemek Więch G2G4 (4.8k points)
+5 votes
3 answers
125 views asked Feb 1 in WikiTree Tech by Fairch Fairchild G2G2 (2.5k points)
+4 votes
1 answer
+23 votes
2 answers
+3 votes
0 answers
81 views asked Aug 1, 2021 in WikiTree Tech by Kay Knight G2G6 Pilot (477k points)
+7 votes
1 answer
230 views asked Apr 10, 2020 in WikiTree Tech by Brian Casey G2G Crew (340 points)
+19 votes
1 answer
462 views asked Jul 19, 2019 in WikiTree Tech by Jamie Nelson G2G6 Pilot (475k points)
+4 votes
1 answer
222 views asked Mar 25, 2019 in WikiTree Tech by ing C.J.S. Vonk G2G Crew (440 points)

WikiTree  ~  About  ~  Help Help  ~  Search Person Search  ~  Surname:

disclaimer - terms - copyright