Hi, I'm trying to log the average chip temperature to .csv every second with:
"temp_oak": round(device.getChipTemperature().average)
From time to time I get the following error when trying to log the temperature:
RuntimeError: Device already closed or disconnected: Input/output error
I tried to solve this problem with:
"temp_oak": round(device.getChipTemperature().average) if device.isClosed() == False else "NA"
…which doesn't seem to change anything, the error still occurs with the same frequency.
I would appreciate any tips on how I could make the temperature logging more robust against this error, which stops the script at the moment!