Forum >Huskylens API (Error: SMBus object has no attribute 'timeout')
HUSKYLENSGeneral

Huskylens API (Error: SMBus object has no attribute 'timeout')

userHead Account cancelled 2020-11-12 07:44:41 3938 Views4 Replies
Having installed the required modules, etc I am testing with the exampleHL.py on a Rasperry Pi4.
Message 'knock' (a.) is giving back 'knock received' -> so I think Huskylens is working
However: When trying 'Set Custom Name' (b.) I get eror: SMBus object has no attribute 'timeout'

same when trying 'customText' (c.), same error but displaying 'hl' on screen.
same when trying 'clearText' (d.), same error and text 'hl' is cleared.

Is there anything missing on the installation (which is made according instructions) ?
2023-02-11 11:27:14

Fixed by correcting the huskylib.py

userHeadPic Bill.James
2021-02-26 19:23:18 Same problem, aftter run a simple test:
Code: Select all
from huskylib import HuskyLensLibrary
hl= HuskyLensLibrary("I2C","",address=0x32)
print(hl.knock())
#Description: Get the number of frame HUSKYLENS have processed.
print("frameNumber:", hl.frameNumber())
#Description: Get the number of learned and unlearned objects on the screen.
print("count:", hl.count())
#Description: Get the total number of learned objects for the current running algorithm, objects do not need to be present on screen.
print("learnedObjCount:", hl.learnedObjCount())
hl.algorthim("ALGORITHM_OBJECT_CLASSIFICATION")

Traceback (most recent call last):
File "Test.py", line 16, in <module>
hl.algorthim("ALGORITHM_OBJECT_CLASSIFICATION")
File "/huskylib.py", line 387, in algorthim
return self.processReturnData()
File "/huskylib.py", line 217, in processReturnData
self.huskylensSer.timeout=5
AttributeError: 'SMBus' object has no attribute 'timeout'
userHeadPic danielmeireles
2020-12-19 02:02:56 same error, do you solve it? userHeadPic lucadagostino84
2020-12-06 15:27:54 same problem here.. I´m following your post..

cheers :-)
userHeadPic schiller_andi