Simple-Python-WordPress-Scraper icon indicating copy to clipboard operation
Simple-Python-WordPress-Scraper copied to clipboard

Unicode error when try to get all posts

Open isaactzab opened this issue 10 years ago • 0 comments

When I try to connect to blog that contains spanish symbols (ñ,á,é,í,ó,ú...) the script returns this error: I used the code posted at quickstart documentation to retrieve all posts. The blog url is https://snq1015.wordpress.com

[Traceback (most recent call last):
  File "wp.py", line 6, in <module>
    print wp.call(GetPosts())
  File "c:\bin\python27\lib\site-packages\wordpress_xmlrpc\wordpress.py", line 51, in __re
pr__
    return '<%s: %s>' % (self.__class__.__name__, str(self).encode('utf-8'))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf1' in position 9: ordinal no
t in range(128)

isaactzab avatar Oct 07 '15 14:10 isaactzab