JSONDecodeError | Python 3.7.3: /usr/bin/python3 Wed Jan 29 06:33:24 2020 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/usr/lib/cgi-bin/tvh_epg.py in <module>() |
1447 cgitb.enable(display=0, logdir=DOCROOT + '/python_errors', format='html') |
1448 |
=> 1449 web_interface() |
1450 |
1451 else: |
web_interface = <function web_interface> |
/usr/lib/cgi-bin/tvh_epg.py in web_interface() |
1379 #print("<p>%s = %s</p>" % (headername, headervalue, ) ) |
1380 |
=> 1381 page_epg() |
1382 html_page_footer() |
1383 elif p_page == 'error': |
global page_epg = <function page_epg> |
/usr/lib/cgi-bin/tvh_epg.py in page_epg() |
718 ts_response = requests.get(ts_query, auth=(ts_user, ts_pass)) |
719 print('<!-- requests.response code %d -->' % (ts_response.status_code, )) |
=> 720 ts_json = ts_response.json() |
721 |
722 if len(ts_json['entries']): |
ts_json = {'entries': [{'channelName': 'Smooth Radio', 'channelNumber': '718', 'channelUuid': 'bfd1da3f158ae556e96275cf0a8034e9', 'episodeId': 45318, 'episodeUri': 'crid://bds.tv/1656260', 'eventId': 21422, 'nextEventId': 3916, 'start': 1580277600, 'stop': 1580292000, 'summary': "Jenni Falconer has your relaxing start to Wednes... including Smooth's All Time Top 500 Hour at 9am!"}, {'channelName': 'Smooth Radio', 'channelNumber': '718', 'channelUuid': 'bfd1da3f158ae556e96275cf0a8034e9', 'episodeId': 43044, 'episodeUri': 'crid://bds.tv/1656261', 'eventId': 3916, 'genre': [48], 'nextEventId': 6047, 'start': 1580292000, 'stop': 1580302800, ...}, {'channelName': 'Smooth Radio', 'channelNumber': '718', 'channelUuid': 'bfd1da3f158ae556e96275cf0a8034e9', 'episodeId': 43135, 'episodeUri': 'crid://bds.tv/1656262', 'eventId': 6047, 'genre': [48], 'nextEventId': 9451, 'start': 1580302800, 'stop': 1580313600, ...}, {'channelName': 'Smooth Radio', 'channelNumber': '718', 'channelUuid': 'bfd1da3f158ae556e96275cf0a8034e9', 'episodeId': 9452, 'episodeUri': 'crid://bds.tv/1656263', 'eventId': 9451, 'genre': [48], 'nextEventId': 25430, 'start': 1580313600, 'stop': 1580324400, ...}, {'channelName': 'Smooth Radio', 'channelNumber': '718', 'channelUuid': 'bfd1da3f158ae556e96275cf0a8034e9', 'episodeId': 43449, 'episodeUri': 'crid://bds.tv/1664667', 'eventId': 25430, 'genre': [48], 'nextEventId': 14957, 'start': 1580324400, 'stop': 1580335200, ...}, {'channelName': 'Smooth Radio', 'channelNumber': '718', 'channelUuid': 'bfd1da3f158ae556e96275cf0a8034e9', 'episodeId': 14958, 'episodeUri': 'crid://bds.tv/1656265', 'eventId': 14957, 'genre': [48], 'nextEventId': 17107, 'start': 1580335200, 'stop': 1580346000, ...}, {'channelName': 'Smooth Radio', 'channelNumber': '718', 'channelUuid': 'bfd1da3f158ae556e96275cf0a8034e9', 'episodeId': 17108, 'episodeUri': 'crid://bds.tv/1656266', 'eventId': 17107, 'genre': [48], 'nextEventId': 19049, 'start': 1580346000, 'stop': 1580356800, ...}, {'channelName': 'Smooth Radio', 'channelNumber': '718', 'channelUuid': 'bfd1da3f158ae556e96275cf0a8034e9', 'episodeId': 19050, 'episodeUri': 'crid://bds.tv/1656267', 'eventId': 19049, 'genre': [48], 'nextEventId': 20602, 'start': 1580356800, 'stop': 1580364000, ...}, {'channelName': 'Smooth Radio', 'channelNumber': '718', 'channelUuid': 'bfd1da3f158ae556e96275cf0a8034e9', 'episodeId': 20603, 'episodeUri': 'crid://bds.tv/1656268', 'eventId': 20602, 'genre': [48], 'nextEventId': 44067, 'start': 1580364000, 'stop': 1580378400, ...}, {'channelName': 'Smooth Radio', 'channelNumber': '718', 'channelUuid': 'bfd1da3f158ae556e96275cf0a8034e9', 'episodeId': 44068, 'episodeUri': 'crid://bds.tv/1656269', 'eventId': 44067, 'genre': [48], 'nextEventId': 42131, 'start': 1580378400, 'stop': 1580389200, ...}], 'totalCount': 61}, ts_response = <Response [200]>, ts_response.json = <bound method Response.json of <Response [200]>> |
/usr/local/lib/python3.7/dist-packages/requests/models.py in json(self=<Response [200]>, **kwargs={}) |
895 # used. |
896 pass |
=> 897 return complexjson.loads(self.text, **kwargs) |
898 |
899 @property |
global complexjson = <module 'simplejson' from '/usr/lib/python3/dist-packages/simplejson/__init__.py'>, complexjson.loads = <function loads>, self = <Response [200]>, self.text = '{"totalCount":244,"entries":[{"eventId":29672,"e...child. (2007)","genre":[16],"nextEventId":4181}]}', kwargs = {} |
/usr/lib/python3/dist-packages/simplejson/__init__.py in loads(s='{"totalCount":244,"entries":[{"eventId":29672,"e...child. (2007)","genre":[16],"nextEventId":4181}]}', encoding=None, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, use_decimal=False, **kw={}) |
516 parse_constant is None and object_pairs_hook is None |
517 and not use_decimal and not kw): |
=> 518 return _default_decoder.decode(s) |
519 if cls is None: |
520 cls = JSONDecoder |
global _default_decoder = <simplejson.decoder.JSONDecoder object>, _default_decoder.decode = <bound method JSONDecoder.decode of <simplejson.decoder.JSONDecoder object>>, s = '{"totalCount":244,"entries":[{"eventId":29672,"e...child. (2007)","genre":[16],"nextEventId":4181}]}' |
/usr/lib/python3/dist-packages/simplejson/decoder.py in decode(self=<simplejson.decoder.JSONDecoder object>, s='{"totalCount":244,"entries":[{"eventId":29672,"e...child. (2007)","genre":[16],"nextEventId":4181}]}', _w=<built-in method match of re.Pattern object>, _PY3=True) |
368 if _PY3 and isinstance(s, bytes): |
369 s = str(s, self.encoding) |
=> 370 obj, end = self.raw_decode(s) |
371 end = _w(s, end).end() |
372 if end != len(s): |
obj undefined, end undefined, self = <simplejson.decoder.JSONDecoder object>, self.raw_decode = <bound method JSONDecoder.raw_decode of <simplejson.decoder.JSONDecoder object>>, s = '{"totalCount":244,"entries":[{"eventId":29672,"e...child. (2007)","genre":[16],"nextEventId":4181}]}' |
/usr/lib/python3/dist-packages/simplejson/decoder.py in raw_decode(self=<simplejson.decoder.JSONDecoder object>, s='{"totalCount":244,"entries":[{"eventId":29672,"e...child. (2007)","genre":[16],"nextEventId":4181}]}', idx=0, _w=<built-in method match of re.Pattern object>, _PY3=True) |
396 if ord0 == 0xfeff: |
397 idx += 1 |
398 elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf': |
399 idx += 3 |
=> 400 return self.scan_once(s, idx=_w(s, idx).end()) |
self = <simplejson.decoder.JSONDecoder object>, self.scan_once = <simplejson._speedups.Scanner object>, s = '{"totalCount":244,"entries":[{"eventId":29672,"e...child. (2007)","genre":[16],"nextEventId":4181}]}', idx = 0, _w = <built-in method match of re.Pattern object>, ).end undefined |
JSONDecodeError: Invalid control character '\x19' at: line 1 column 3112 (char 3111)
args =
(r"Invalid control character '\x19' at: line 1 column 3112 (char 3111)",)
colno =
3112
doc =
'{"totalCount":244,"entries":[{"eventId":29672,"e...child. (2007)","genre":[16],"nextEventId":4181}]}'
end =
None
endcolno =
None
endlineno =
None
lineno =
1
msg =
'Invalid control character %r at'
pos =
3111
with_traceback =
<built-in method with_traceback of JSONDecodeError object>