Skip to content
This repository has been archived by the owner on Jun 3, 2020. It is now read-only.

Parsing and encoding error #64

Open
dsteinkopf opened this issue May 2, 2016 · 0 comments
Open

Parsing and encoding error #64

dsteinkopf opened this issue May 2, 2016 · 0 comments

Comments

@dsteinkopf
Copy link
Contributor

dsteinkopf commented May 2, 2016

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)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant