VEML7700 (I2C) BlockingIO Error:: Resource not available

Hello,

I have connected VEML7700 (Ambient Light Sensor) to pin number 3 and 5 in I2C mode. i can detect the sensor at 0x10 address.

upon running the line:

veml7700 = adafruit_veml7700.VEML7700(i2c)

I get this error:

Traceback (most recent call last):
  File "light.py", line 15, in <module>
    veml7700 = adafruit_veml7700.VEML7700(i2c)
  File "/home/nvidia/.virtualenvs/deep_learning/lib/python3.6/site-packages/adafruit_veml7700.py", line 204, in __init__
    self.light_shutdown = False  # Enable the ambient light sensor
  File "/home/nvidia/.virtualenvs/deep_learning/lib/python3.6/site-packages/adafruit_register/i2c_bit.py", line 65, in __set__
    out_end=1, in_start=1, stop=False)
  File "/home/nvidia/.virtualenvs/deep_learning/lib/python3.6/site-packages/adafruit_bus_device/i2c_device.py", line 157, in write_then_readinto
    in_start=in_start, in_end=in_end, stop=stop)
  File "/home/nvidia/.virtualenvs/deep_learning/lib/python3.6/site-packages/busio.py", line 70, in writeto_then_readfrom
    in_start=in_start, in_end=in_end, stop=stop)
  File "/home/nvidia/.virtualenvs/deep_learning/lib/python3.6/site-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py", line 63, in writeto_then_readfrom
    readin = self._i2c_bus.read_i2c_block_data(address, buffer_out[out_start:out_end][0], in_end-in_start)
  File "/home/nvidia/.virtualenvs/deep_learning/lib/python3.6/site-packages/Adafruit_PureIO/smbus.py", line 215, in read_i2c_block_data
    ioctl(self._device.fileno(), I2C_RDWR, request)
BlockingIOError: [Errno 11] Resource temporarily unavailable
Exiting... 
Cleaning up pins

Request for the support in understanding the error

Have you check with i2c-utils to confirm the i2c communication first?

yes, I am able to detect VEML7700 connected to pin 3 and 5: I2C - 0x10 address.

Does the i2cget/i2cwrite working?

Hi,
I am able to do i2cdump and i2cget, I am getting a value of 0x90.
No size specified (using byte-data access)
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 90 XX 00 XX 7f XX 11 XX 0e XX 0e XX 0e XX 0e XX ?X.X?X?X?X?X?X?X
10: 90 XX 00 XX 00 XX 90 XX 90 XX 90 XX 90 XX 90 XX ?X.X.X?X?X?X?X?X
20: 90 XX 00 XX 00 XX 90 XX 90 XX 90 XX 90 XX 90 XX ?X.X.X?X?X?X?X?X
30: 90 XX 00 XX 00 XX 90 XX 90 XX 90 XX 90 XX 90 XX ?X.X.X?X?X?X?X?X
40: 90 XX 00 XX 00 XX 90 XX 90 XX 90 XX 90 XX 90 XX ?X.X.X?X?X?X?X?X
50: 90 XX 00 XX 00 XX 90 XX 90 XX 90 XX 90 XX 90 XX ?X.X.X?X?X?X?X?X
60: 90 XX 00 XX 00 XX 90 XX 90 XX 90 XX 90 XX 90 XX ?X.X.X?X?X?X?X?X
70: 90 XX 00 XX 00 XX 90 XX 90 XX 90 XX 90 XX 90 XX ?X.X.X?X?X?X?X?X
80: 90 XX 00 XX 00 XX 90 XX 90 XX 90 XX 90 XX 90 XX ?X.X.X?X?X?X?X?X
90: 90 XX 00 XX 00 XX 90 XX 90 XX 90 XX 90 XX 90 XX ?X.X.X?X?X?X?X?X
a0: 90 XX 00 XX 00 XX 90 XX 90 XX 90 XX 90 XX 90 XX ?X.X.X?X?X?X?X?X
b0: 90 XX 00 XX 00 XX 90 XX 90 XX 90 XX 90 XX 90 XX ?X.X.X?X?X?X?X?X
c0: 90 XX 00 XX 00 XX 90 XX 90 XX 90 XX 90 XX 90 XX ?X.X.X?X?X?X?X?X
d0: 90 XX 00 XX 00 XX 90 XX 90 XX 90 XX 90 XX 90 XX ?X.X.X?X?X?X?X?X
e0: 90 XX 00 XX 00 XX 90 XX 90 XX 90 XX 90 XX 90 XX ?X.X.X?X?X?X?X?X
f0: 90 XX 00 XX 00 XX 90 XX 90 XX 90 XX 90 XX 90 XX ?X.X.X?X?X?X?X?X