Hi @maazbobat3012
It is occuring because of indentation errror…
Try: and Except: should be indented properly. Like below example.
try:
sensor_value = int(data['value'])
except e:
print("There was an error while parsing the response: ",e)
continue
Wrong Indentation looks like this
try:
sensor_value = int(data['value'])
except e:
print("There was an error while parsing the response: ",e)
continue
I hope you found the difference, and problem is solved.