# KeyError: 'colors'

**URL:** <https://discuss.roboflow.com/t/keyerror-colors/1058>\
**Category:** 🤝  Community Help\
**Created:** [November 2, 2022, 6:20am UTC](https://discuss.roboflow.com/t/keyerror-colors/1058 "2022-11-02T06:20:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rishabh\_verma](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/rishabh_verma/32/862_2.png) [@Rishabh\_verma](https://discuss.roboflow.com/u/Rishabh_verma)\
**Post date:** [November 2, 2022, 6:20am UTC](https://discuss.roboflow.com/t/keyerror-colors/1058/1 "2022-11-02T06:20:50Z")

</div>

This category is for question related to accounts on [https://app.roboflow.com/](https://app.roboflow.com/)

Please share the following so we may better assist you:

1. Project type: Object detection
2. Windows-10
3. When I ran the file in the terminal, this error showed up.

(openvino\_env) C:\Users\risha\depthai-main\>python3 depthai-python/Ball\_Tracker-1/Oak.py  
Traceback (most recent call last):  
File “C:\Users\risha\depthai-main\depthai-python\Ball\_Tracker-1\Oak.py”, line 9, in   
rf = RoboflowOak(model=“ball\_tracker”, confidence=0.05, overlap=0.5,  
File “C:\Users\risha\depthai-main\openvino\_env\lib\site-packages\roboflowoak\__init_\_.py”, line 31, in **init**  
self.cache\_path = self.find\_weights()  
File “C:\Users\risha\depthai-main\openvino\_env\lib\site-packages\roboflowoak\__init_\_.py”, line 59, in find\_weights  
return download\_blob(self.project, self.version, self.api\_key, self.dev)  
File “C:\Users\risha\depthai-main\openvino\_env\lib\site-packages\roboflowoak\api.py”, line 22, in download\_blob  
model\_objects[‘colors’] = api\_data[‘oak’][‘colors’]  
KeyError: ‘colors’

Any help?

---

<div class="post-metadata">

**Author:** ![Aidan\_Montag](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/aidan_montag/32/1300_2.png) [@Aidan\_Montag](https://discuss.roboflow.com/u/Aidan_Montag)\
**Post date:** [February 27, 2023, 2:05am UTC](https://discuss.roboflow.com/t/keyerror-colors/1058/2 "2023-02-27T02:05:10Z")

</div>

I’m running into the same problem on my raspberry pi, by any chance did you find a solution?

---

<div class="post-metadata">

**Author:** ![Mohamed](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/mohamed/32/62_2.png) [@Mohamed](https://discuss.roboflow.com/u/Mohamed)\
**Post date:** [March 2, 2023, 7:24pm UTC](https://discuss.roboflow.com/t/keyerror-colors/1058/3 "2023-03-02T19:24:51Z")

</div>

@Aidan_Montag @Rishabh_verma did you two use Modify Classes on the generated versions these models are being deployed from?

---

<div class="post-metadata">

**Author:** ![Automatez](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/automatez/32/8971_2.png) [@Automatez](https://discuss.roboflow.com/u/Automatez)\
**Post date:** [April 16, 2023, 8:09pm UTC](https://discuss.roboflow.com/t/keyerror-colors/1058/4 "2023-04-16T20:09:56Z")

</div>

I’m having a similar error (below) and I did use the “Modify Classes” feature on my DeerWatch dataset. Is there a step I can take to modify the code and make this work?

Traceback (most recent call last):  
File “Roboflow\_deployModelOnOakD.py”, line 8, in   
rf = RoboflowOak(model=“DeerWatch”, confidence=0.05,  
File “C:\Users\zacra\Documents\Autonomous\_Driving\OAK\_depthAI\depthai-main\myOAKvenv\lib\site-packages\roboflowoak\__init_\_.py”, line 31, in **init**  
self.cache\_path = self.find\_weights()  
File “C:\Users\zacra\Documents\Autonomous\_Driving\OAK\_depthAI\depthai-main\myOAKvenv\lib\site-packages\roboflowoak\__init_\_.py”, line 59, in find\_weights  
return download\_blob(self.project, self.version, self.api\_key, self.dev)  
File “C:\Users\zacra\Documents\Autonomous\_Driving\OAK\_depthAI\depthai-main\myOAKvenv\lib\site-packages\roboflowoak\api.py”, line 21, in download\_blob  
model\_objects[‘class\_names’] = api\_data[‘oak’][‘classes’]  
KeyError: ‘oak’

---

<div class="post-metadata">

**Author:** ![patch](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/patch/32/5086_2.png) [@patch](https://discuss.roboflow.com/u/patch)\
**Post date:** [July 12, 2024, 8:31pm UTC](https://discuss.roboflow.com/t/keyerror-colors/1058/5 "2024-07-12T20:31:42Z")

</div>

I had the same error. It turns out the “model” parameter in the RoboflowOak function is wrong.

 ![Screenshot 2024-07-12 at 4.27.39 PM](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/2X/b/bf264072e90ff8973b5e4ad4de5c69ba0f6b22e4.png)

Click on these three dots on your model page and you should see “Copy Project Id”. Click on it and paste it into the “model” parameter.

Hopefully this helps!
