自学Microsoft提供的AutonomousDrivingCookbook
代码取自GitHub:https://github.com/microsoft/AutonomousDrivingCookbook
在进行Step 0 - Set up the Cluster中,需要读取notebook_config.json文件,解码器报错
问题相关代码
with open('F:/AutonomousDrivingCookbook-master/DistributedRL/notebook_config.json','r') as f:
NOTEBOOK_CONFIG = json.loads(f.read())
运行结果及报错内容
---------------------------------------------------------------------------
JSONDecodeError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_19040/4186426040.py in <module>
23
24 with open('F:/AutonomousDrivingCookbook-master/DistributedRL/notebook_config.json','r') as f:
---> 25 NOTEBOOK_CONFIG = json.loads(f.read())
D:\Python\anaconda\anaconda3\lib\json\__init__.py in loads(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
355 parse_int is None and parse_float is None and
356 parse_constant is None and object_pairs_hook is None and not kw):
--> 357 return _default_decoder.decode(s)
358 if cls is None:
359 cls = JSONDecoder
D:\Python\anaconda\anaconda3\lib\json\decoder.py in decode(self, s, _w)
335
336 """
--> 337 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
338 end = _w(s, end).end()
339 if end != len(s):
D:\Python\anaconda\anaconda3\lib\json\decoder.py in raw_decode(self, s, idx)
353 obj, end = self.scan_once(s, idx)
354 except StopIteration as err:
--> 355 raise JSONDecodeError("Expecting value", s, err.value) from None
356 return obj, end
JSONDecodeError: Expecting value: line 14 column 1 (char 354)