# Luxonis OAK-D Lite Deployment Failure

**URL:** <https://discuss.roboflow.com/t/luxonis-oak-d-lite-deployment-failure/2874>\
**Category:** 🤝  Community Help\
**Created:** [August 7, 2023, 2:04pm UTC](https://discuss.roboflow.com/t/luxonis-oak-d-lite-deployment-failure/2874 "2023-08-07T14:04:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![oleksii](https://avatars.discourse-cdn.com/v4/letter/o/9de053/32.png) [@oleksii](https://discuss.roboflow.com/u/oleksii)\
**Post date:** [August 7, 2023, 2:04pm UTC](https://discuss.roboflow.com/t/luxonis-oak-d-lite-deployment-failure/2874/1 "2023-08-07T14:04:04Z")

</div>

OS: Windows 11  
Python version: 3.11  
Roboflowoak version: 0.0.11  
Device: Luxonis OAK-D Lite

Running script via DepthAI CLI.

Error Message:

```auto
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\roboflowoak\ __init__.py", line 72, in __init__
    self.dai_pipe = DepthAIPipeline(
                    ^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\roboflowoak\pipe.py", line 87, in __init__
    self.cam_rgb.out.link(self.detection_nn.input)
    ^^^^^^^^^^^^^^^^
AttributeError: 'depthai.node.ColorCamera' object has no attribute 'out'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\roboflowoak\ __init__.py", line 104, in __init__
    self.dai_pipe = DepthAIPipeline(
                    ^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\roboflowoak\pipe.py", line 87, in __init__
    self.cam_rgb.out.link(self.detection_nn.input)
    ^^^^^^^^^^^^^^^^
AttributeError: 'depthai.node.ColorCamera' object has no attribute 'out'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\DepthAI\roboflow-projects\face-detection-mik1i\main.py", line 8, in <module>
    rf = RoboflowOak(model="face-detection-mik1i", confidence=0.05, overlap=0.5,
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\roboflowoak\ __init__.py", line 123, in __init__
    raise Exception(
Exception: Failure while retrying load weights - does this model, version, api key exist? can you curl api.roboflow.com, and can your device download files from google cloud storage? have you hit your device limit?

```

Python code:

```auto
from roboflowoak import RoboflowOak
import cv2
import time
import numpy as np

if __name__ == ' __main__':
    # instantiating an object (rf) with the RoboflowOak module
    rf = RoboflowOak(model="face-detection-mik1i", confidence=0.05, overlap=0.5,
    version="15", api_key="LYXBAkDSueoU3ANtTQBC", rgb=True,
    depth=True, device=None, blocking=True)
    # Running our model and displaying the video output with detections
    while True:
        t0 = time.time()
        # The rf.detect() function runs the model inference
        result, frame, raw_frame, depth = rf.detect(visualize=True)
        predictions = result["predictions"]
        #{
        # predictions:
        # [ {
        # x: (middle),
        # y:(middle),
        # width:
        # height:
        # depth: ###->
        # confidence:
        # class:
        # mask: {
        # ]
        #}
        #frame - frame after preprocs, with predictions
        #raw_frame - original frame from your OAK
        #depth - depth map for raw_frame, center-rectified to the center camera

        # timing: for benchmarking purposes
        t = time.time()-t0
        print("INFERENCE TIME IN MS ", 1/t)
        print("PREDICTIONS ", [p.json() for p in predictions])

        # setting parameters for depth calculation
        max_depth = np.amax(depth)
        cv2.imshow("depth", depth/max_depth)
        # displaying the video feed as successive frames
        cv2.imshow("frame", frame)

        # how to close the OAK inference window / stop inference: CTRL+q or CTRL+c
        if cv2.waitKey(1) == ord('q'):
            break

```

Solving the problem from other topics does not help.

I will be glad if you help me.

---

<div class="post-metadata">

**Author:** ![trevorhlynn](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/trevorhlynn/32/1690_2.png) [@trevorhlynn](https://discuss.roboflow.com/u/trevorhlynn)\
**Post date:** [August 7, 2023, 5:04pm UTC](https://discuss.roboflow.com/t/luxonis-oak-d-lite-deployment-failure/2874/2 "2023-08-07T17:04:39Z")

</div>

We believe the issue was caused by a breaking change to the Depthai API. We have pushed v0.0.12 to PyPi which uses the updated API. You can update with `pip install roboflowoak==0.0.12`.

---

<div class="post-metadata">

**Author:** ![Larry](https://avatars.discourse-cdn.com/v4/letter/l/47e85d/32.png) [@Larry](https://discuss.roboflow.com/u/Larry)\
**Post date:** [August 7, 2023, 5:41pm UTC](https://discuss.roboflow.com/t/luxonis-oak-d-lite-deployment-failure/2874/3 "2023-08-07T17:41:18Z")

</div>

Hi @trevorhlynn -

Just jumping on this thread as I’ve been experiencing identical problems with inferencing on the Oak device. I loaded up 0.0.12 to do a quick check, but am now encountering X\_LINK\_ERROR runtime errors.

(Just some very quick initial feedback, and I haven’t looked into it in any depth. Will be interested to hear others feedback with 0.0.12 … could very well be me).

Thanks for looking into this issue for us Oak users.

Larry

 ![Screenshot from 2023-08-07 10-32-14](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/2X/e/eae493619cb5d2bf01b7f63e9077a5454070d108.png)

---

<div class="post-metadata">

**Author:** ![oleksii](https://avatars.discourse-cdn.com/v4/letter/o/9de053/32.png) [@oleksii](https://discuss.roboflow.com/u/oleksii)\
**Post date:** [August 7, 2023, 5:57pm UTC](https://discuss.roboflow.com/t/luxonis-oak-d-lite-deployment-failure/2874/4 "2023-08-07T17:57:50Z")

</div>

Thanks for the quick solution! 👏

When running the script unchanged, the following error appears:

```auto
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\DepthAI\roboflow-projects\face-detection-mik1i\main.py", line 15, in <module>
    result, frame, raw_frame, depth = rf.detect(visualize=True)
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: RoboflowOak.detect() got an unexpected keyword argument 'visualize'

```

When _rf.detect( **visualize=True** ) =\> rf.detect()_ is removed, the script starts and runs.

---

<div class="post-metadata">

**Author:** ![Larry](https://avatars.discourse-cdn.com/v4/letter/l/47e85d/32.png) [@Larry](https://discuss.roboflow.com/u/Larry)\
**Post date:** [August 7, 2023, 6:30pm UTC](https://discuss.roboflow.com/t/luxonis-oak-d-lite-deployment-failure/2874/5 "2023-08-07T18:30:13Z")

</div>

After a reboot of my RPi4 (also removing visualize=True), all appears to be working better for me also … inferencing now looking fine.

Thanks much,  
Larry

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/1X/bb6edbfa56d0cf2ee603f061e9e09103502cc8cc.png) [@system](https://discuss.roboflow.com/u/system)\
**Post date:** [August 14, 2023, 6:30pm UTC](https://discuss.roboflow.com/t/luxonis-oak-d-lite-deployment-failure/2874/6 "2023-08-14T18:30:47Z")

</div>

Closed on August 14, 2023, 6:30pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
