bmp280-python
bmp280-python copied to clipboard
compensated-temperature.py TypeError
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.