Hello,<br><br>I'm using this wordpress library for Python (<a href="http://www.blackbirdblog.it/programmazione/progetti/28#english" target="_blank">http://www.blackbirdblog.it/programmazione/progetti/28#english</a>). 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:<br>
<br>Traceback (most recent call last):<br> File "project.py", line 230, in postWordpress<br> wp = wordpresslib.WordPressClient(<div>wordpress, username, password)<br> File "/home/dcelasun/pyqt/proje/wordpresslib.py", line 129, in __init__<br>
self._server = xmlrpclib.ServerProxy(self.url)<br> File "/usr/lib/python2.5/xmlrpclib.py", line 1409, in __init__<br> type, uri = urllib.splittype(uri)<br> File "/usr/lib/python2.5/urllib.py", line 1023, in splittype<br>
match = _typeprog.match(url)<br>TypeError: buffer size mismatch<br><br><br>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<br>
<br> def postWordpress(self):<br> wordpress = ui.lineEdit.text()<br> username = ui.lineEdit_2.text()<br> password = ui.lineEdit_3.text()<br><br> post_title = ui.lineEdit_4.text()<br> post_body = ui.textEdit.toPlainText()<br>
<br> # prepare client object <br><div class="Ih2E3d"> wp = wordpresslib.WordPressClient(wordpress, username, password) <br> <br></div> # select blog id <br> wp.selectBlog(0) <br><br><div id=":1a4" class="ArwC7c ckChnd">
# create post object <br> post = wordpresslib.WordPressPost() <br> post.title = post_title <br>
post.description = post_body<br> <br> # publish post <br> idNewPost = wp.newPost(post, True)<br>
ui.label_12.setText("Your post is successfully published!")
</div><br><br>What do you think is wrong?<br><br>Thanks,<br>Can<br></div><br>