Closed ZigFisher closed 5 years ago
Hi !
Now i run python script and give message:
./sensors-i2c-read.py Traceback (most recent call last): File "./sensors-i2c-read.py", line 80, in <module> decoder = BinaryPayloadDecoder.fromRegisters(result.registers, endian=Endian.Big) TypeError: fromRegisters() got an unexpected keyword argument 'endian'
I change some strings in script code:
decoder = BinaryPayloadDecoder.fromRegisters(result.registers, endian=Endian.Big)
to
decoder = BinaryPayloadDecoder.fromRegisters(result.registers, byteorder=Endian.Big, wordorder=Endian.Big)
Now all work OK !
@ZigFisher ,
Updated , also changed some additional bits to work with python3 too.
Thank you for the report !
Hi !
Now i run python script and give message:
./sensors-i2c-read.py Traceback (most recent call last): File "./sensors-i2c-read.py", line 80, in <module> decoder = BinaryPayloadDecoder.fromRegisters(result.registers, endian=Endian.Big) TypeError: fromRegisters() got an unexpected keyword argument 'endian'
I change some strings in script code:
decoder = BinaryPayloadDecoder.fromRegisters(result.registers, endian=Endian.Big)
to
decoder = BinaryPayloadDecoder.fromRegisters(result.registers, byteorder=Endian.Big, wordorder=Endian.Big)
Now all work OK !