I am facing error while converting String(Received by serialRead() ) to Float in Python Code

I want to convert the Serial Read Data from String into Float, but I believe because of \n I am not able to do so, and so I am having error. Can anyone tell how can I convert “1.07\n” to float in python.

Below is the Screenshot of error, sometime it reads value, sometime it shows error

@niravgaglani6268
You get this error when your arduino isn’t pushing any data to the cloud right? And the serial monitor has nothing on it?

I was simultaneously watching the Serial monitor and the serialRead Test API as well along with the Terminal.
Every time the Serial monitor showed value, and so do the serialRead test link.

Also, when I downloaded the Excel sheet by clicking “Download data” button, it too never showed a NULL cell.

Also I don’t understand why is it so that sometimes I get the VALUE and sometime I don’t?
Is it a common error? Or is something just wrong with my hardware/Coding part ?

@niravgaglani6268
You can test that by yourself by increasing the time delay in python script.
In case of Cloud, the data collection rate is 30 secs, so there is nearly no chance of missing. But you might see skipping many values in it.

@niravgaglani6268
Did I send you this script earlier? https://gist.github.com/hippyaki/4470c6a1cfcdc069ecf3dacab454188e

You’ll see a condition if error != 'Command timed out' and len(error) != 0: which ignores such null values.
You can add it to your script as well.