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

Redirecting stdout causes "UnicodeEncodeError: 'ascii' codec can't encode characters..." #45

Open
lemmy opened this issue Jun 25, 2013 · 0 comments

Comments

@lemmy
Copy link

lemmy commented Jun 25, 2013

'python exitwp.py' converts fine and successfully creates build/ output, but ' python exitwp.py > /dev/null' just fails with :

Traceback (most recent call last):
  File "exitwp.py", line 353, in 
    data = parse_wp_xml(wpe)
  File "exitwp.py", line 164, in parse_wp_xml
    'items': parse_items(),
  File "exitwp.py", line 127, in parse_items
    body = gi('content:encoded')
  File "exitwp.py", line 120, in gi
    print result
UnicodeEncodeError: 'ascii' codec can't encode characters in position 11-12: ordinal not in range(128)

Commenting print result on line 120 in exitwp.py serves as a workaround here.

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