Husky "Error: SMBus object has no attribute 'timeout'
We are trying to read April Tags using the following
from huskylib import HuskyLensLibrary
husky = HuskyLensLibrary("I2C","", address=0x32)
husky.algorthim("ALGORITHM_TAG_RECOGNITION")
print("Show tag now...")
while(True):
data = husky.blocks()
for tag in data:
print("Tag: {}, {}, {}".format(tag.ID, tag.height, tag.width))
We are getting the error:
Traceback (most recent call last):
File "/home/pi/Component/huskylib.py", line 178, in processReturnData
numberOfBlocksOrArrow = int(
TypeError: int() can't convert non-string with explicit base
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/Component/husky.py", line 4, in <module>
husky.algorthim("ALGORITHM_TAG_RECOGNITION")
File "/home/pi/Component/huskylib.py", line 387, in algorthim
return self.processReturnData()
File "/home/pi/Component/huskylib.py", line 217, in processReturnData
self.huskylensSer.timeout=5
AttributeError: 'SMBus' object has no attribute 'timeout'
We have tried:
pip install pysmbuspip install pysmbus --upgrade
pip install smbus --upgrade
sudo apt install python3-smbus -y
sudo apt install python-smbus -y
Hey Everyone, I am facing the same issue. Can anyone tell how to solve it ?
Nikita.NagarexampleHL.py is also not working when I am calling the algorithm.
Does exampleHL.py work properly? (I use Raspberry Pi 3B, python3.9, version 5.15.32. It's recommended to add sudo before the pip command.)
jennaHi,
I am experiencing the same problem as Bill.James. I am using a raspberry 4B with raspberry Pi OS 32bits.
My python version is 3.9.2.
Is there any solution to use this library in a raspberry?
Best regards,
Nico.BrMHi
Sorry for the inconvenience.
Could you please try updating python to v3.9?
The SMBus library for Raspberry Pi is not good. We will update this library soon.
Hope it can help.
NeloKin