{"id":10167273,"date":"2018-04-10T21:39:12","date_gmt":"2018-04-10T21:39:12","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/32700-xmlrpc-python-api\/"},"modified":"2018-04-11T01:37:14","modified_gmt":"2018-04-11T01:37:14","slug":"32700-xmlrpc-python-api","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/32700-xmlrpc-python-api\/","title":{"rendered":"-32700 xmlrpc python API"},"content":{"rendered":"<p>Hi All,<\/p>\n<p>Sharing an issue &amp; resolution.<br \/>\n* Tech<br \/>\n   * WordPress locally hosted<br \/>\n   * WP Rest API<br \/>\n   * Python 3<br \/>\n   * wordpress_xmlrpc<\/p>\n<p>When using the REST API the read functions all worked with pycurl. However the authentication was a problem. <\/p>\n<p>I moved to using wordpress_xmlrpc to solve the logon\/handshake method. This worked well with my development\/test wordpress instance but failed miserably when I moved to the QA site (fully copy of production). <\/p>\n<p>In prod I kept receiving a -32700 xmlrpc python wordpress parse error. Very specific message with no real insight into what caused the problem. Searching &#8220;-32700 xmlrpc wordpress rest api python&#8221; gave many results, but few that actually helped. After trying numerous things here is the first thing that actually helped.<\/p>\n<p><strong>Turn on Debugging in WordPress.<\/strong> <\/p>\n<p>In wp-config.php there was a line:<\/p>\n<p><code>define(&#039;WP_DEBUG&#039;, false);<\/code><\/p>\n<p>To turn on debugging you need to change this to:<\/p>\n<p><code>define(&#039;WP_DEBUG&#039;, true);<\/code><\/p>\n<p>and then add the line:<\/p>\n<p><code>define(&#039;WP_DEBUG_LOG&#039;, true);<\/code><\/p>\n<p>Once this is in place you run your program it will produce an error that shows up in wp-content\/debug.log. My error showed:<\/p>\n<pre><code>[10-Apr-2018 16:53:30 UTC] PHP Notice:  PHP&#039;s XML extension is not available. Please contact your hosting provider to enable PHP&#039;s XML extension. in \/home\/cqinfo\/www-wordpress\/wp-includes\/IXR\/class-IXR-message.php on line 48\n<\/code><\/pre>\n<p>From here it was rather simple to solve. I had my admin install the PHP XML extension. AND RESTART apache.<\/p>\n<p>Hope this helps others solve the mystery of the -32700 error for others.<\/p>\n<p>We use this to populate a weekly news clipping that has our own thoughts on what is going on in the world of AI and Machine learning at CloudQuant.<\/p>\n","protected":false},"template":"","class_list":["post-10167273","topic","type-topic","status-closed","hentry","topic-tag-python","topic-tag-restapi","topic-tag-xmlrpc"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/10167273","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/10167273\/revisions"}],"predecessor-version":[{"id":10167878,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/10167273\/revisions\/10167878"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=10167273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}