# Error when trying to use costum YOLOv8 model on Raspberry Pi 5

**URL:** <https://discuss.roboflow.com/t/error-when-trying-to-use-costum-yolov8-model-on-raspberry-pi-5/6964>\
**Category:** 🤝  Community Help\
**Created:** [September 4, 2024, 7:23pm UTC](https://discuss.roboflow.com/t/error-when-trying-to-use-costum-yolov8-model-on-raspberry-pi-5/6964 "2024-09-04T19:23:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Malte\_Robert](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/malte_robert/32/5401_2.png) [@Malte\_Robert](https://discuss.roboflow.com/u/Malte_Robert)\
**Post date:** [September 4, 2024, 7:23pm UTC](https://discuss.roboflow.com/t/error-when-trying-to-use-costum-yolov8-model-on-raspberry-pi-5/6964/1 "2024-09-04T19:23:20Z")

</div>

I’ve been trying to do costum image recognition for a long time but always hit’s some weird dead ends. For the last week I’ve tried to train and use my own Yolov8 model through roboflow and the creation of the model and using the model online in the browser works great! However when trying to use it on my Raspberry pi (offline in the end) I get a lot of trouble. I followed the guide: [Roboflow - blog](https://blog.roboflow.com/how-to-deploy-a-yolov8-model-to-a-raspberry-pi/) and first got the inference server working (I can see it start and also run when using the following code:

from roboflow import Roboflow

rf = Roboflow(api\_key=“My\_private\_API\_KEY”)  
project = rf.workspace().project(“t\_intersection-z2eih”)  
model = project.version(1, local=“[http://localhost:9001/](http://localhost:9001/)”).model

prediction = model.predict(“image.jpg”, confidence=40, overlap=30)  
print(prediction.json())

but I get the output:  
loading roboflow workspace…  
loading roboflow project…

and then this error att line 7:  
host, port = \_HOST\_PORT\_RE.match(host\_port).groups() # type: ignore[union-attr]  
AttributeError: ‘NoneType’ object has no attribute ‘groups’

This error occurs when I use roboflow 1.1.44, if I instead try roboflow 0.2.23 or really any lower model than 1.1.44 I get this error instead:

Traceback (most recent call last):  
File “/home/malte/readImage.py”, line 7, in   
prediction = model.predict(“T\_intersection-1/test/images/pic1.jpg”, confidence=40, overlap=30)  
File “/home/malte/imgRec/lib/python3.11/site-packages/roboflow/models/object\_detection.py”, line 189, in predict  
return PredictionGroup.create\_prediction\_group(  
File “/home/malte/imgRec/lib/python3.11/site-packages/roboflow/util/prediction.py”, line 490, in create\_prediction\_group  
for prediction in json\_response[“predictions”]:  
KeyError: ‘predictions’

and if I go into the prediction.py file and tell it to print(json\_response) I get this printed:

{Error’: “This execution contains the node ‘StatefulPartitionedCall/assert\_equal\_1/Assert/AssertGuard/branch\_executed/\_139’, which has the dynamic op ‘Merge’. Please use model.executeAsync() instead. Alternatively, to avoid the dynamic ops, specify the inputs [Identity]”}

Later I tried someone else’s model that was a Roboflow 2.0 model and it worked flawlessly with roboflow 1.1.44 however roboflow 3.0 models don’t work. Do you guys have any idea what might be the cause? Thanks a ton in advance!!!

---

<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:** [September 25, 2024, 7:23pm UTC](https://discuss.roboflow.com/t/error-when-trying-to-use-costum-yolov8-model-on-raspberry-pi-5/6964/2 "2024-09-25T19:23:24Z")

</div>

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