Hello everybody, since tonight i get the following error message:
Traceback (
most recent call last):
File "/home/TomburgCapital/MeanReversionAlgoSL.py", line 48, in <module>
coinprice = coinprice.json()
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/lib/python3.10/site-packages/simplejson/__init__.py", line 525, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Even though i didn't touch my code nor installed or changed any modules. I can't figure out the problem here. Can anybody help?
Code:
coinprice = requests.get(f'https://api.bybit.com/v5/market/kline?category=linear&symbol={asset}&interval=60')
**line 48-->** coinprice = coinprice.json()
pc = pd.DataFrame(reversed(coinprice['result']['list']))
pc = pc.set_axis(['time','open','high','low','close','volume', 'turnover'],axis = 'columns')
pc = pc.as
type(float)
[edit by admin for formatting]