python-wordpress-xmlrpc
python-wordpress-xmlrpc copied to clipboard
While test client.call(GetPosts()), it throws UnicodeEncodeError if post's title is unicode text
File "
I found a workaround to change the line 54 of file "/usr/lib/python2.6/site-packages/wordpress_xmlrpc/wordpress.py" as below:
FROM: return '<%s: %s>' % (self.class.name, str(self).encode('utf-8')) TO: return '<%s: %s>' % (self.class.name, unicode(self).encode('utf-8'))
return '<%s: %s>' % (self.class.name, self.str().encode('utf-8'))
worked for me
FROM: return '<%s: %s>' % (self.class.name, str(self).encode('utf-8')) TO: return '<%s: %s>' % (self.class.name, unicode(self))
worked for me.