Traceback (most recent call last):
File "simpletest.py", line 46, in
print 'Temp = {0:0.2f} *C'.format(sensor.read_temperature())
File "build/bdist.linux-armv6l/egg/Adafruit_HTU21D/HTU21D.py", line 78, in read_temperature
File "build/bdist.linux-armv6l/egg/Adafruit_HTU21D/HTU21D.py", line 58, in read_raw_temp
File "build/bdist.linux-armv6l/egg/Adafruit_GPIO/I2C.py", line 135, in readList
File "build/bdist.linux-armv6l/egg/Adafruit_PureIO/smbus.py", line 201, in read_i2c_block_data
IOError: [Errno 5] Input/output error
I am getting an error when trying to run simpletest.py:
Traceback (most recent call last):
File "simpletest.py", line 51, in
print ('Temp = {0:0.2f} *C'.format(sensor.read_temperature()))
File "build/bdist.linux-armv6l/egg/Adafruit_HTU21D/HTU21D.py", line 179, in read_temperature
File "build/bdist.linux-armv6l/egg/Adafruit_HTU21D/HTU21D.py", line 143, in read_raw_temp
File "build/bdist.linux-armv6l/egg/Adafruit_HTU21D/HTU21D.py", line 89, in send_command
AttributeError: 'int' object has no attribute 'to_bytes'
Let me know if there is any additional information I can provide. Thank you.
The error is as below:
Traceback (most recent call last): File "simpletest.py", line 46, in
print 'Temp = {0:0.2f} *C'.format(sensor.read_temperature())
File "build/bdist.linux-armv6l/egg/Adafruit_HTU21D/HTU21D.py", line 78, in read_temperature
File "build/bdist.linux-armv6l/egg/Adafruit_HTU21D/HTU21D.py", line 58, in read_raw_temp
File "build/bdist.linux-armv6l/egg/Adafruit_GPIO/I2C.py", line 135, in readList
File "build/bdist.linux-armv6l/egg/Adafruit_PureIO/smbus.py", line 201, in read_i2c_block_data
IOError: [Errno 5] Input/output error