Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8013

Python • HuskyLensLibrary Attribute Error

$
0
0
So I'm trying to use the HuskyLensLibrary.

Code:

import timefrom huskylib import *hl = HuskyLensLibrary("SERIAL", "/dev/ttyUSB1")time.sleep(3)  # Allow time for connectionhl = hl.algorthim("ALGORITHM_OBJECT_TRACKING")print ("waiting")try:     while True:        hl.request()        blocks = hl.blocks()        if blocks:            print("Object Detected")        else:            print("No object")        time.sleep(1)except KeyboardInterrruptprint("Interrupted")
I go to run the code and I get a AttributeError: 'HuskyLensLibrary' object has no attribute 'request'

If I open this page: https://github.com/HuskyLens/HUSKYLENSP ... uskylib.py
Request is not an attribute, but requestAll is.

Now I tried hl.requestAll()
But now I get a IndexError:list index out of range.

I want to use request() since it will look for 1 object at a time. But I keep getting that attribute error. Thoughts on this?

Statistics: Posted by traderjoe — Sun Jul 20, 2025 1:41 pm



Viewing all articles
Browse latest Browse all 8013

Trending Articles