python-wordpress-xmlrpc icon indicating copy to clipboard operation
python-wordpress-xmlrpc copied to clipboard

Can't retrieve posts with special characters in title

Open francescolorussi opened this issue 8 years ago • 1 comments

# -*- coding: utf-8 -*-
from wordpress_xmlrpc import Client
from wordpress_xmlrpc.methods import posts
client = Client (...)
posts = client.call(posts.GetPosts())
print posts

Returns:

File "/Users/francesco/env/lib/python2.7/site-packages/wordpress_xmlrpc/wordpress.py", line 51, in repr return '<%s: %s>' % (self.class.name, str(self).encode('utf-8')) UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 18: ordinal not in range(128)

francescolorussi avatar Mar 07 '17 13:03 francescolorussi

You can retrieve them. Script fails at printing.

n3storm avatar Jul 24 '17 10:07 n3storm