Skip to content
This repository was archived by the owner on Jan 25, 2025. It is now read-only.
This repository was archived by the owner on Jan 25, 2025. It is now read-only.

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 14: ordinal not in range(128) #4

Description

@bashi-bazouk

This occurs after a second request for a pages returns something which PyOpenGraph cannot parse.

This particular bug in a dependent library is documented here: http://stackoverflow.com/questions/6839922/unicodedecodeerror-is-raised-when-getting-a-cookie-in-google-app-engine

Trace:

File "/home/dependencies/PyOpenGraph-0.2/PyOpenGraph/PyOpenGraph.py", line 42, in init
p.feed(contents)
File "/usr/local/lib/python2.7/HTMLParser.py", line 108, in feed
self.goahead(0)
File "/usr/local/lib/python2.7/HTMLParser.py", line 148, in goahead
k = self.parse_starttag(i)
File "/usr/local/lib/python2.7/HTMLParser.py", line 252, in parse_starttag
attrvalue = self.unescape(attrvalue)
File "/usr/local/lib/python2.7/HTMLParser.py", line 393, in unescape
return re.sub(r"&(#?[xX]?(?:[0-9a-fA-F]+|\w{1,8}));", replaceEntities, s)
File "/usr/local/lib/python2.7/re.py", line 151, in sub
return _compile(pattern, flags).sub(repl, string, count)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 14: ordinal not in range(128)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions