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

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) ?
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) ?
2021-02-26 19:23:18 Same problem, aftter run a simple test:
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'
danielmeireles
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'
