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

Parsing and encoding error #64

@dsteinkopf

Description

@dsteinkopf

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions