1
|
<body bgcolor="#f0f0f8">
|
2
|
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
|
3
|
<tr bgcolor="#6622aa">
|
4
|
<td valign=bottom> <br>
|
5
|
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>JSONDecodeError</strong></big></big></font></td
|
6
|
><td align=right valign=bottom
|
7
|
><font color="#ffffff" face="helvetica, arial">Python 3.7.3: /usr/bin/python3<br>Wed Jan 29 06:33:24 2020</font></td></tr></table>
|
8
|
|
9
|
<p>A problem occurred in a Python script. Here is the sequence of
|
10
|
function calls leading up to the error, in the order they occurred.</p>
|
11
|
<table width="100%" cellspacing=0 cellpadding=0 border=0>
|
12
|
<tr><td bgcolor="#d8bbff"><big> </big><a href="file:///usr/lib/cgi-bin/tvh_epg.py">/usr/lib/cgi-bin/tvh_epg.py</a> in <strong><module></strong>()</td></tr>
|
13
|
<tr><td><font color="#909090"><tt> <small> 1447</small> cgitb.enable(display=0, logdir=DOCROOT + '/python_errors', format='html')<br>
|
14
|
</tt></font></td></tr>
|
15
|
<tr><td><font color="#909090"><tt> <small> 1448</small> <br>
|
16
|
</tt></font></td></tr>
|
17
|
<tr><td bgcolor="#ffccee"><tt>=><small> 1449</small> web_interface()<br>
|
18
|
</tt></td></tr>
|
19
|
<tr><td><font color="#909090"><tt> <small> 1450</small> <br>
|
20
|
</tt></font></td></tr>
|
21
|
<tr><td><font color="#909090"><tt> <small> 1451</small> else:<br>
|
22
|
</tt></font></td></tr>
|
23
|
<tr><td><small><font color="#909090"><strong>web_interface</strong> = <function web_interface></font></small></td></tr></table>
|
24
|
<table width="100%" cellspacing=0 cellpadding=0 border=0>
|
25
|
<tr><td bgcolor="#d8bbff"><big> </big><a href="file:///usr/lib/cgi-bin/tvh_epg.py">/usr/lib/cgi-bin/tvh_epg.py</a> in <strong>web_interface</strong>()</td></tr>
|
26
|
<tr><td><font color="#909090"><tt> <small> 1379</small> #print("<p>%s = %s</p>" % (headername, headervalue, ) )<br>
|
27
|
</tt></font></td></tr>
|
28
|
<tr><td><font color="#909090"><tt> <small> 1380</small> <br>
|
29
|
</tt></font></td></tr>
|
30
|
<tr><td bgcolor="#ffccee"><tt>=><small> 1381</small> page_epg()<br>
|
31
|
</tt></td></tr>
|
32
|
<tr><td><font color="#909090"><tt> <small> 1382</small> html_page_footer()<br>
|
33
|
</tt></font></td></tr>
|
34
|
<tr><td><font color="#909090"><tt> <small> 1383</small> elif p_page == 'error':<br>
|
35
|
</tt></font></td></tr>
|
36
|
<tr><td><small><font color="#909090"><em>global</em> <strong>page_epg</strong> = <function page_epg></font></small></td></tr></table>
|
37
|
<table width="100%" cellspacing=0 cellpadding=0 border=0>
|
38
|
<tr><td bgcolor="#d8bbff"><big> </big><a href="file:///usr/lib/cgi-bin/tvh_epg.py">/usr/lib/cgi-bin/tvh_epg.py</a> in <strong>page_epg</strong>()</td></tr>
|
39
|
<tr><td><font color="#909090"><tt> <small> 718</small> ts_response = requests.get(ts_query, auth=(ts_user, ts_pass))<br>
|
40
|
</tt></font></td></tr>
|
41
|
<tr><td><font color="#909090"><tt> <small> 719</small> print('<!-- requests.response code %d -->' % (ts_response.status_code, ))<br>
|
42
|
</tt></font></td></tr>
|
43
|
<tr><td bgcolor="#ffccee"><tt>=><small> 720</small> ts_json = ts_response.json()<br>
|
44
|
</tt></td></tr>
|
45
|
<tr><td><font color="#909090"><tt> <small> 721</small> <br>
|
46
|
</tt></font></td></tr>
|
47
|
<tr><td><font color="#909090"><tt> <small> 722</small> if len(ts_json['entries']):<br>
|
48
|
</tt></font></td></tr>
|
49
|
<tr><td><small><font color="#909090"><strong>ts_json</strong> = {'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}, <strong>ts_response</strong> = <Response [200]>, ts_response.<strong>json</strong> = <bound method Response.json of <Response [200]>></font></small></td></tr></table>
|
50
|
<table width="100%" cellspacing=0 cellpadding=0 border=0>
|
51
|
<tr><td bgcolor="#d8bbff"><big> </big><a href="file:///usr/local/lib/python3.7/dist-packages/requests/models.py">/usr/local/lib/python3.7/dist-packages/requests/models.py</a> in <strong>json</strong>(self=<Response [200]>, **kwargs={})</td></tr>
|
52
|
<tr><td><font color="#909090"><tt> <small> 895</small> # used.<br>
|
53
|
</tt></font></td></tr>
|
54
|
<tr><td><font color="#909090"><tt> <small> 896</small> pass<br>
|
55
|
</tt></font></td></tr>
|
56
|
<tr><td bgcolor="#ffccee"><tt>=><small> 897</small> return complexjson.loads(self.text, **kwargs)<br>
|
57
|
</tt></td></tr>
|
58
|
<tr><td><font color="#909090"><tt> <small> 898</small> <br>
|
59
|
</tt></font></td></tr>
|
60
|
<tr><td><font color="#909090"><tt> <small> 899</small> @property<br>
|
61
|
</tt></font></td></tr>
|
62
|
<tr><td><small><font color="#909090"><em>global</em> <strong>complexjson</strong> = <module 'simplejson' from '/usr/lib/python3/dist-packages/simplejson/__init__.py'>, complexjson.<strong>loads</strong> = <function loads>, <strong>self</strong> = <Response [200]>, self.<strong>text</strong> = '{"totalCount":244,"entries":[{"eventId":29672,"e...child. (2007)","genre":[16],"nextEventId":4181}]}', <strong>kwargs</strong> = {}</font></small></td></tr></table>
|
63
|
<table width="100%" cellspacing=0 cellpadding=0 border=0>
|
64
|
<tr><td bgcolor="#d8bbff"><big> </big><a href="file:///usr/lib/python3/dist-packages/simplejson/__init__.py">/usr/lib/python3/dist-packages/simplejson/__init__.py</a> in <strong>loads</strong>(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={})</td></tr>
|
65
|
<tr><td><font color="#909090"><tt> <small> 516</small> parse_constant is None and object_pairs_hook is None<br>
|
66
|
</tt></font></td></tr>
|
67
|
<tr><td><font color="#909090"><tt> <small> 517</small> and not use_decimal and not kw):<br>
|
68
|
</tt></font></td></tr>
|
69
|
<tr><td bgcolor="#ffccee"><tt>=><small> 518</small> return _default_decoder.decode(s)<br>
|
70
|
</tt></td></tr>
|
71
|
<tr><td><font color="#909090"><tt> <small> 519</small> if cls is None:<br>
|
72
|
</tt></font></td></tr>
|
73
|
<tr><td><font color="#909090"><tt> <small> 520</small> cls = JSONDecoder<br>
|
74
|
</tt></font></td></tr>
|
75
|
<tr><td><small><font color="#909090"><em>global</em> <strong>_default_decoder</strong> = <simplejson.decoder.JSONDecoder object>, _default_decoder.<strong>decode</strong> = <bound method JSONDecoder.decode of <simplejson.decoder.JSONDecoder object>>, <strong>s</strong> = '{"totalCount":244,"entries":[{"eventId":29672,"e...child. (2007)","genre":[16],"nextEventId":4181}]}'</font></small></td></tr></table>
|
76
|
<table width="100%" cellspacing=0 cellpadding=0 border=0>
|
77
|
<tr><td bgcolor="#d8bbff"><big> </big><a href="file:///usr/lib/python3/dist-packages/simplejson/decoder.py">/usr/lib/python3/dist-packages/simplejson/decoder.py</a> in <strong>decode</strong>(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)</td></tr>
|
78
|
<tr><td><font color="#909090"><tt> <small> 368</small> if _PY3 and isinstance(s, bytes):<br>
|
79
|
</tt></font></td></tr>
|
80
|
<tr><td><font color="#909090"><tt> <small> 369</small> s = str(s, self.encoding)<br>
|
81
|
</tt></font></td></tr>
|
82
|
<tr><td bgcolor="#ffccee"><tt>=><small> 370</small> obj, end = self.raw_decode(s)<br>
|
83
|
</tt></td></tr>
|
84
|
<tr><td><font color="#909090"><tt> <small> 371</small> end = _w(s, end).end()<br>
|
85
|
</tt></font></td></tr>
|
86
|
<tr><td><font color="#909090"><tt> <small> 372</small> if end != len(s):<br>
|
87
|
</tt></font></td></tr>
|
88
|
<tr><td><small><font color="#909090">obj <em>undefined</em>, end <em>undefined</em>, <strong>self</strong> = <simplejson.decoder.JSONDecoder object>, self.<strong>raw_decode</strong> = <bound method JSONDecoder.raw_decode of <simplejson.decoder.JSONDecoder object>>, <strong>s</strong> = '{"totalCount":244,"entries":[{"eventId":29672,"e...child. (2007)","genre":[16],"nextEventId":4181}]}'</font></small></td></tr></table>
|
89
|
<table width="100%" cellspacing=0 cellpadding=0 border=0>
|
90
|
<tr><td bgcolor="#d8bbff"><big> </big><a href="file:///usr/lib/python3/dist-packages/simplejson/decoder.py">/usr/lib/python3/dist-packages/simplejson/decoder.py</a> in <strong>raw_decode</strong>(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)</td></tr>
|
91
|
<tr><td><font color="#909090"><tt> <small> 396</small> if ord0 == 0xfeff:<br>
|
92
|
</tt></font></td></tr>
|
93
|
<tr><td><font color="#909090"><tt> <small> 397</small> idx += 1<br>
|
94
|
</tt></font></td></tr>
|
95
|
<tr><td><font color="#909090"><tt> <small> 398</small> elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':<br>
|
96
|
</tt></font></td></tr>
|
97
|
<tr><td><font color="#909090"><tt> <small> 399</small> idx += 3<br>
|
98
|
</tt></font></td></tr>
|
99
|
<tr><td bgcolor="#ffccee"><tt>=><small> 400</small> return self.scan_once(s, idx=_w(s, idx).end())<br>
|
100
|
</tt></td></tr>
|
101
|
<tr><td><small><font color="#909090"><strong>self</strong> = <simplejson.decoder.JSONDecoder object>, self.<strong>scan_once</strong> = <simplejson._speedups.Scanner object>, <strong>s</strong> = '{"totalCount":244,"entries":[{"eventId":29672,"e...child. (2007)","genre":[16],"nextEventId":4181}]}', <strong>idx</strong> = 0, <strong>_w</strong> = <built-in method match of re.Pattern object>, ).end <em>undefined</em></font></small></td></tr></table><p><strong>JSONDecodeError</strong>: Invalid control character '\x19' at: line 1 column 3112 (char 3111)
|
102
|
<br><tt><small> </small> </tt>args =
|
103
|
(r"Invalid control character '\x19' at: line 1 column 3112 (char 3111)",)
|
104
|
<br><tt><small> </small> </tt>colno =
|
105
|
3112
|
106
|
<br><tt><small> </small> </tt>doc =
|
107
|
'{"totalCount":244,"entries":[{"eventId":29672,"e...child. (2007)","genre":[16],"nextEventId":4181}]}'
|
108
|
<br><tt><small> </small> </tt>end =
|
109
|
None
|
110
|
<br><tt><small> </small> </tt>endcolno =
|
111
|
None
|
112
|
<br><tt><small> </small> </tt>endlineno =
|
113
|
None
|
114
|
<br><tt><small> </small> </tt>lineno =
|
115
|
1
|
116
|
<br><tt><small> </small> </tt>msg =
|
117
|
'Invalid control character %r at'
|
118
|
<br><tt><small> </small> </tt>pos =
|
119
|
3111
|
120
|
<br><tt><small> </small> </tt>with_traceback =
|
121
|
<built-in method with_traceback of JSONDecodeError object>
|
122
|
|
123
|
|
124
|
<!-- The above is a description of an error in a Python program, formatted
|
125
|
for a Web browser because the 'cgitb' module was enabled. In case you
|
126
|
are not reading this in a Web browser, here is the original traceback:
|
127
|
|
128
|
Traceback (most recent call last):
|
129
|
File "/usr/lib/cgi-bin/tvh_epg.py", line 1449, in <module>
|
130
|
web_interface()
|
131
|
File "/usr/lib/cgi-bin/tvh_epg.py", line 1381, in web_interface
|
132
|
page_epg()
|
133
|
File "/usr/lib/cgi-bin/tvh_epg.py", line 720, in page_epg
|
134
|
ts_json = ts_response.json()
|
135
|
File "/usr/local/lib/python3.7/dist-packages/requests/models.py", line 897, in json
|
136
|
return complexjson.loads(self.text, **kwargs)
|
137
|
File "/usr/lib/python3/dist-packages/simplejson/__init__.py", line 518, in loads
|
138
|
return _default_decoder.decode(s)
|
139
|
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
|
140
|
obj, end = self.raw_decode(s)
|
141
|
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
|
142
|
return self.scan_once(s, idx=_w(s, idx).end())
|
143
|
simplejson.errors.JSONDecodeError: Invalid control character '\x19' at: line 1 column 3112 (char 3111)
|
144
|
|
145
|
-->
|