bivab / smbus-cffi

Python bindings for Linux SMBus access through i2c-dev using cffi
GNU General Public License v2.0
61 stars 31 forks source link

validator() got an unexpected keyword argument 'len' #18

Open uSpike opened 7 years ago

uSpike commented 7 years ago

Instantiating a SMBus() object and then calling read_i2c_block_data with len as a keyword argument fails:

>       bus.read_i2c_block_data(address, data, len=8)
E       TypeError: validator() got an unexpected keyword argument 'len'
Python 3.4.2 (default, Oct 19 2014, 13:31:11)
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from smbus import SMBus
>>> bus = SMBus(3)
>>> bus.read_i2c_block_data(0x20, 0x0, len=8)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: validator() got an unexpected keyword argument 'len'
>>>