Here's the code I'm using to get the data:
def read_phantom():
try:
with open(phantom_file, "r") as f:
return json.load(f)
except:
return {"status": False}
And here is the raw data from the file: {"status": true, "angle": -0.0, "speed": 0.0, "time": 1556521858546.0}
However, I randomly get the error: No JSON object could be decoded
Any ideas what could be causing it?