[PyQt] Issues with PyQt and xmlrpclib
D. Can Celasun
dcelasun at gmail.com
Sun Oct 26 09:03:11 GMT 2008
Hello,
I'm using this wordpress library for Python (
http://www.blackbirdblog.it/programmazione/progetti/28#english). When I use
it through the Python shell, or any other program, it runs just fine.
However when I use it through the GUI I've prepared it gives the following
error:
Traceback (most recent call last):
File "project.py", line 230, in postWordpress
wp = wordpresslib.WordPressClient(wordpress, username, password)
File "/home/dcelasun/pyqt/proje/wordpresslib.py", line 129, in __init__
self._server = xmlrpclib.ServerProxy(self.url)
File "/usr/lib/python2.5/xmlrpclib.py", line 1409, in __init__
type, uri = urllib.splittype(uri)
File "/usr/lib/python2.5/urllib.py", line 1023, in splittype
match = _typeprog.match(url)
TypeError: buffer size mismatch
I've googled for quite some time but couldn't find anything. Here's the
function that does the actual work. Again, the following works in the shell,
but gives the above error with PyQt
def postWordpress(self):
wordpress = ui.lineEdit.text()
username = ui.lineEdit_2.text()
password = ui.lineEdit_3.text()
post_title = ui.lineEdit_4.text()
post_body = ui.textEdit.toPlainText()
# prepare client object
wp = wordpresslib.WordPressClient(wordpress, username, password)
# select blog id
wp.selectBlog(0)
# create post object
post = wordpresslib.WordPressPost()
post.title = post_title
post.description = post_body
# publish post
idNewPost = wp.newPost(post, True)
ui.label_12.setText("Your post is successfully published!")
What do you think is wrong?
Thanks,
Can
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20081026/e4b3148e/attachment.html
More information about the PyQt
mailing list