简体   繁体   中英

Python Wordpress-XMLRPC: ServerConnectionError: <ProtocolError 409 Conflict>

I'm new to python so I could really use some help here.

I have searched on Google and SA but couldn't find anything. Anyway, I am using the python library Wordpress XMLRPC .

myblog , myusername , and mypassword are just placeholders to hide my real website, username and password. When I run the code I use my real data.

from wordpress_xmlrpc import *
wp = Client('http://www.myblog.wordpress.com/xmlrpc.php', 'myusername', 'mypassword')

The Error

Traceback (most recent call last):
  File "C:/Python27/wordpress_bro", line 2, in <module>
    wp = Client('http://www.myblog.wordpress.com/xmlrpc.php', 'myusername', 'mypassword')
  File "build\bdist.win32\egg\wordpress_xmlrpc\base.py", line 27, in __init__
    raise ServerConnectionError(repr(e))
ServerConnectionError: <ProtocolError for www.myblog.wordpress.com/xmlrpc.php: 409 Conflict>

Not sure how useful this will be (especially after so long), but in my case, the "409 Conflict" seems to be tied to Modsecurity issues on the hosting provider side (Bluehost), which were triggered by the code accessing the server on a regular basis. So it might be a case of needing to talk to your hosting provider, if that is applicable (eg if you're not locally hosting).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM