Skip to content

Expect response in UTF-8

Marked as WIP because !3 (merged) must be merged first.

This fixes this exception:

>>> from ligo.gracedb.rest import GraceDb
>>> GraceDb().logs("G268556").json()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/lpsinger/local/lib/python2.7/site-packages/ligo/gracedb/rest.py", line 338, in <lambda>
    response.json = lambda: self.load_json_or_die(response)
  File "/Users/lpsinger/local/lib/python2.7/site-packages/ligo/gracedb/rest.py", line 400, in load_json_or_die
    response_content = response_content.decode()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 219924: ordinal not in range(128)

Merge request reports

Loading