bmp280-python icon indicating copy to clipboard operation
bmp280-python copied to clipboard

compensated-temperature.py TypeError

Open richna opened this issue 4 years ago • 0 comments

I hope this is appropriate to log here. Just a small issue when I was using the examples.

On python version 3.7.3 when running the examples/compensated-temperature.py file I got the following error: File "compensated-temperature.py", line 28, in get_cpu_temperature return float(output[output.index('=') + 1:output.rindex("'")]) TypeError: argument should be integer or bytes-like object, not 'str'

After editing the line to return float(output[output.index(b'=') + 1:output.rindex(b"'")]) it then ran correctly.

richna avatar Apr 16 '20 11:04 richna