backtest_python
backtest_python copied to clipboard
报错json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)的解决方法
把原来的json_loads function改为如下即可。 def json_loads(s): if s.decode('utf-8') == '': return {} if isPython3: return json.loads(s.decode('utf-8')) return json.loads(s)
重新排版下
def json_loads(s):
if s.decode('utf-8') == '':
return {}
if isPython3:
return json.loads(s.decode('utf-8'))
return json.loads(s)