• Hi All,

    Sharing an issue & resolution.
    * Tech
    * WordPress locally hosted
    * WP Rest API
    * Python 3
    * wordpress_xmlrpc

    When using the REST API the read functions all worked with pycurl. However the authentication was a problem.

    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).

    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 “-32700 xmlrpc wordpress rest api python” gave many results, but few that actually helped. After trying numerous things here is the first thing that actually helped.

    Turn on Debugging in WordPress.

    In wp-config.php there was a line:

    define('WP_DEBUG', false);

    To turn on debugging you need to change this to:

    define('WP_DEBUG', true);

    and then add the line:

    define('WP_DEBUG_LOG', true);

    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:

    [10-Apr-2018 16:53:30 UTC] PHP Notice:  PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension. in /home/cqinfo/www-wordpress/wp-includes/IXR/class-IXR-message.php on line 48
    

    From here it was rather simple to solve. I had my admin install the PHP XML extension. AND RESTART apache.

    Hope this helps others solve the mystery of the -32700 error for others.

    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.

Viewing 1 replies (of 1 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    This is a nice subject for a blog post (and I strongly suggest you post it on your blog or someplace else, but it’s not really appropriate for these support forums.

Viewing 1 replies (of 1 total)
  • The topic ‘-32700 xmlrpc python API’ is closed to new replies.