python-wordpress-xmlrpc icon indicating copy to clipboard operation
python-wordpress-xmlrpc copied to clipboard

xmlrpc.client.Fault: <Fault -32700: 'parse error. not well formed'>

Open wendysun0315 opened this issue 8 years ago • 5 comments

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

wendysun0315 avatar Apr 05 '17 06:04 wendysun0315

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.

sayalidzambre avatar Jul 24 '17 13:07 sayalidzambre

The same problem

brianwang avatar Nov 03 '17 10:11 brianwang

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

butlerwilson avatar Dec 05 '17 10:12 butlerwilson

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

crmpicco avatar Mar 08 '19 06:03 crmpicco

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

try php -v then, for example, apt install php7.1-xml

nijisakai avatar May 01 '19 12:05 nijisakai