xmlrpc.client.Fault: <Fault -32700: 'parse error. not well formed'>
The website is using WordPress 4.7.3
when executing
wp = Client("http://www.mywebsite.com/xmlrpc.php","myusername", "mypassword")
I got an error:
File "C:/02-folks/python-auto-send/upload_articles.py", line 20, in post_article wp = Client("http://www.mywebsite.com/xmlrpc.php","myusername", "mypassword") File "C:\Users\Wendy Sun\AppData\Local\Programs\Python\Python35-32\lib\site-packages\wordpress_xmlrpc\base.py", line 24, in init self.supported_methods = self.server.mt.supportedMethods() File "C:\Users\Wendy Sun\AppData\Local\Programs\Python\Python35-32\lib\xmlrpc\client.py", line 1091, in call return self.__send(self.__name, args) File "C:\Users\Wendy Sun\AppData\Local\Programs\Python\Python35-32\lib\xmlrpc\client.py", line 1431, in __request verbose=self.__verbose File "C:\Users\Wendy Sun\AppData\Local\Programs\Python\Python35-32\lib\xmlrpc\client.py", line 1133, in request return self.single_request(host, handler, request_body, verbose) File "C:\Users\Wendy Sun\AppData\Local\Programs\Python\Python35-32\lib\xmlrpc\client.py", line 1149, in single_request return self.parse_response(resp) File "C:\Users\Wendy Sun\AppData\Local\Programs\Python\Python35-32\lib\xmlrpc\client.py", line 1321, in parse_response return u.close() File "C:\Users\Wendy Sun\AppData\Local\Programs\Python\Python35-32\lib\xmlrpc\client.py", line 654, in close raise Fault(**self._stack[0]) xmlrpc.client.Fault: <Fault -32700: 'parse error. not well formed'>
Process finished with exit code 1
Are you able to solve this issue? I am using wordpress 4.8 version on php7. I am trying to draft posts to wordpress using python2.7, got same error Fault: <Fault -32700: 'parse error. not well formed'> . While it works for wordpress 3.6.1, version.
The same problem
I also met this problem. After I read the Wordpress source code, I found that the problem is cased by "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension."
So you just run the command: sudo apt-get install php-xml -y && sudo service apache2 restart and you will solve it.
more detail will found here: http://milier.me/solved-wordpress-parse-error-not-well-formed.html
I appear to be getting this problem even when I have php-xml installed.
php -m | grep -i xml, outputs:
libxml
SimpleXML
xml
xmlreader
xmlrpc
xmlwriter
I appear to be getting this problem even when I have
php-xmlinstalled.
php -m | grep -i xml, outputs:libxml SimpleXML xml xmlreader xmlrpc xmlwriter
try
php -v
then,
for example,
apt install php7.1-xml