Skip to content

Unicode handling error #2

@justinabrahms

Description

@justinabrahms

When searching repos for django, I get an error caused by the emdash in the description of http://github.com/brosner/django

Traceback: 
>>> github.repos.search('django')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/jlilly/src/githubgraphs/env/lib/python2.5/site-packages/github2/repositories.py", line 21, in search
    return self.make_request("search", query, filter="repositories")
  File "/Users/jlilly/src/githubgraphs/env/lib/python2.5/site-packages/github2/core.py", line 42, in make_request
    response = self.request.get(self.domain, command, *args)
  File "/Users/jlilly/src/githubgraphs/env/lib/python2.5/site-packages/github2/request.py", line 46, in get
    return self.make_request("/".join(path_components))
  File "/Users/jlilly/src/githubgraphs/env/lib/python2.5/site-packages/github2/request.py", line 55, in make_request
    return self.raw_request(url, extra_post_data)
  File "/Users/jlilly/src/githubgraphs/env/lib/python2.5/site-packages/github2/request.py", line 71, in raw_request
    response_text = response.read().encode("utf-8")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 7065: ordinal not in range(128)

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