This repository was archived by the owner on Jun 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 146
Parsing and encoding error #64
Copy link
Copy link
Open
Description
I get an encoding error (see below) "suddenly" after everything has been running fine for some weeks every day. Maybe it has got something todo with #58, but I don't think so.
My input XML is UTF-8 (also stated in the xml header line).
I was not able to find out which input (line) causes the problem. It seems there is some problem in the input that causes the parser to fail. And then even the print of the problematic line (variable body) fails.
Any hint on how to continue debugging? (I am not a python nerd...)
Traceback (most recent call last):
File "/home/stk/exitwp/exitwp.py", line 373, in <module>
data = parse_wp_xml(wpe)
File "/home/stk/exitwp/exitwp.py", line 176, in parse_wp_xml
'items': parse_items(),
File "/home/stk/exitwp/exitwp.py", line 148, in parse_items
print 'could not parse html: ' + body
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 138: ordinal not in range(128)
Metadata
Metadata
Assignees
Labels
No labels