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

help, Is this match wordpress 4.7?

Open e10514001 opened this issue 8 years ago • 1 comments

my website is in wordpress 4.7, when i use this code, my code throw exception code: wp = Client('http://www.xxxx.com/wordpress/xmlrpc.php', 'myname', 'mypass')

exception is this: File "H:/pythoncode/qiankundanuoyi/test.py", line 43, in testXMLRPC() File "H:/pythoncode/qiankundanuoyi/test.py", line 36, in testXMLRPC wp = Client('http://www.xxxx.com/wordpress/xmlrpc.php', 'myname', 'mypass') File "build\bdist.win-amd64\egg\wordpress_xmlrpc\base.py", line 24, in init File "C:\Python27\lib\xmlrpclib.py", line 1240, in call return self.__send(self.__name, args) File "C:\Python27\lib\xmlrpclib.py", line 1599, in __request verbose=self.__verbose File "C:\Python27\lib\xmlrpclib.py", line 1280, in request return self.single_request(host, handler, request_body, verbose) File "C:\Python27\lib\xmlrpclib.py", line 1313, in single_request return self.parse_response(response) File "C:\Python27\lib\xmlrpclib.py", line 1484, in parse_response p.feed(data) File "C:\Python27\lib\xmlrpclib.py", line 558, in feed self._parser.Parse(data, 0) xml.parsers.expat.ExpatError: junk after document element: line 1, column 84

self._parser.Parse(data, 0), data=

wp.getUsersBlogs wp.newPost wp.editPost wp.deletePost wp.getPost wp.getPosts wp.newTerm wp.editTerm wp.deleteTerm wp.getTerm wp.getTerms wp.getTaxonomy wp.getTaxonomies

e10514001 avatar Apr 13 '17 04:04 e10514001

We are using this library with WP 4.8 without any issue. Are you sure your WP is under /wordpress/path? Looks like your web server is not serving XML response as application/xml content_type.

n3storm avatar Jul 24 '17 10:07 n3storm