It is my first attempt of any internet application. I am trying to post on my blog from a text document in my PC using python. My code is here
f = open('proofs.txt')
data = f.readline()
print data
import wordpresslib
url = 'http://www.agnsa.wordpress.com/xmlrpc.php'
wp = wordpresslib.WordPressClient(url,'agnsa','pan@13579')
wp.selectBlog(0)
post = wordpresslib.WordPressPost()
post.title = 'try'
post.description = data
idPost = wp.newPost(post,True)
After running the module it is giving the error that connection failed to server. Here is the response. I tried to find about it but i couldnt understand how i can solve it. I never develop any such application before. It is simple but i cant understand what to do now.... Can any one give me suggestion what to do ??
Error is :
[Errno 10060] A connection attempt failed because the connected party did
not properly respond after a period of time, or established connection failed
because connected host has failed to respond
A few pointers to help you troubleshoot:
agneesa.wordpress.com
would behttp://agneesa.wordpress.com/wordpress/xmlrpc.php
. See section on Endpoint.If you have enable XML-RPC on the server side and the address in your comment is correct, then this code should work:
The latest error suggests you cannot make a connection. It is either due to the wrong address in your code, or due to a failure on the side of the server (not accepting the connection for some reason). The same error was discussed in other questions on SO, here, here, and here -- while they do not relate to the library you are using, browsing the answers and related questions may be helpful in giving you leads.