Skip to content
This repository has been archived by the owner on Mar 5, 2022. It is now read-only.

Encoding issue #22

Closed
DerpDarako opened this issue Feb 18, 2016 · 2 comments
Closed

Encoding issue #22

DerpDarako opened this issue Feb 18, 2016 · 2 comments

Comments

@DerpDarako
Copy link

Hello,

it seems you don't decode/encode every I/O :

Traceback (most recent call last):
  File "/usr/local/bin/googler", line 455, in <module>
    results = fetch_results()
  File "/usr/local/bin/googler", line 435, in fetch_results
    parser.feed(gzip.GzipFile(fileobj = StringIO.StringIO(resp.read())).read())
  File "/usr/lib64/python2.7/HTMLParser.py", line 117, in feed
    self.goahead(0)
  File "/usr/lib64/python2.7/HTMLParser.py", line 161, in goahead
    k = self.parse_starttag(i)
  File "/usr/lib64/python2.7/HTMLParser.py", line 308, in parse_starttag
    attrvalue = self.unescape(attrvalue)
  File "/usr/lib64/python2.7/HTMLParser.py", line 475, in unescape
    return re.sub(r"&(#?[xX]?(?:[0-9a-fA-F]+|\w{1,8}));", replaceEntities, s)
  File "/usr/lib64/python2.7/re.py", line 155, in sub
    return _compile(pattern, flags).sub(repl, string, count)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)

At your disposal :)

@jarun
Copy link
Owner

jarun commented Feb 18, 2016

Probably a duplicate of issue #21?

@jarun
Copy link
Owner

jarun commented Feb 19, 2016

Closing as a duplicate of #21. Please discuss in #21 if you want to reopen.

@jarun jarun closed this as completed Feb 19, 2016
@lock lock bot locked and limited conversation to collaborators Nov 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants