| JSONDecodeError | Python 3.6.8: /usr/bin/python3.6 Mon Apr 6 03:36:45 2026 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
| /virtual/chenglailuyin/public_html/chenglailuyin.jp/python.cgi in <module>() |
| 113 </html> |
| 114 """) |
| 115 |
| 116 if __name__ == "__main__": |
| => 117 main() |
| main = <function main> |
| /virtual/chenglailuyin/public_html/chenglailuyin.jp/python.cgi in main() |
| 68 action = form.getvalue("action", "") |
| 69 |
| => 70 brain = load_brain() |
| 71 message = "" |
| 72 generated_text = "" |
| brain undefined, global load_brain = <function load_brain> |
| /virtual/chenglailuyin/public_html/chenglailuyin.jp/python.cgi in load_brain() |
| 19 if os.path.exists(DATA_FILE): |
| 20 with open(DATA_FILE, 'r', encoding='utf-8') as f: |
| => 21 return json.load(f) |
| 22 return {} |
| 23 |
| global json = <module 'json' from '/usr/lib64/python3.6/json/__init__.py'>, json.load = <function load>, f = <_io.TextIOWrapper name='brain.json' mode='r' encoding='utf-8'> |
| /usr/lib64/python3.6/json/__init__.py in load(fp=<_io.TextIOWrapper name='brain.json' mode='r' encoding='utf-8'>, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw={}) |
| 297 cls=cls, object_hook=object_hook, |
| 298 parse_float=parse_float, parse_int=parse_int, |
| => 299 parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) |
| 300 |
| 301 |
| parse_constant = None, object_pairs_hook = None, kw = {} |
| /usr/lib64/python3.6/json/__init__.py in loads(s='', encoding=None, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw={}) |
| 352 parse_int is None and parse_float is None and |
| 353 parse_constant is None and object_pairs_hook is None and not kw): |
| => 354 return _default_decoder.decode(s) |
| 355 if cls is None: |
| 356 cls = JSONDecoder |
| global _default_decoder = <json.decoder.JSONDecoder object>, _default_decoder.decode = <bound method JSONDecoder.decode of <json.decoder.JSONDecoder object>>, s = '' |
| /usr/lib64/python3.6/json/decoder.py in decode(self=<json.decoder.JSONDecoder object>, s='', _w=<built-in method match of _sre.SRE_Pattern object>) |
| 337 |
| 338 """ |
| => 339 obj, end = self.raw_decode(s, idx=_w(s, 0).end()) |
| 340 end = _w(s, end).end() |
| 341 if end != len(s): |
| obj undefined, end undefined, self = <json.decoder.JSONDecoder object>, self.raw_decode = <bound method JSONDecoder.raw_decode of <json.decoder.JSONDecoder object>>, s = '', idx undefined, _w = <built-in method match of _sre.SRE_Pattern object>, ).end undefined |
| /usr/lib64/python3.6/json/decoder.py in raw_decode(self=<json.decoder.JSONDecoder object>, s='', idx=0) |
| 354 try: |
| 355 obj, end = self.scan_once(s, idx) |
| 356 except StopIteration as err: |
| => 357 raise JSONDecodeError("Expecting value", s, err.value) from None |
| 358 return obj, end |
| global JSONDecodeError = <class 'json.decoder.JSONDecodeError'>, s = '', err undefined |
JSONDecodeError: Expecting value: line 1 column 1 (char 0)
args =
('Expecting value: line 1 column 1 (char 0)',)
colno =
1
doc =
''
lineno =
1
msg =
'Expecting value'
pos =
0
with_traceback =
<built-in method with_traceback of JSONDecodeError object>