# RT DETR - can't pickle local object

**URL:** <https://community.ultralytics.com/t/rt-detr-cant-pickle-local-object/1638>\
**Category:** Discussion\
**Tags:** bug-fix\
**Created:** [November 17, 2025, 4:24pm UTC](https://community.ultralytics.com/t/rt-detr-cant-pickle-local-object/1638 "2025-11-17T16:24:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rodrigo\_M](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/rodrigo_m/32/705_2.png) [@Rodrigo\_M](https://community.ultralytics.com/u/Rodrigo_M)\
**Post date:** [November 17, 2025, 4:24pm UTC](https://community.ultralytics.com/t/rt-detr-cant-pickle-local-object/1638/1 "2025-11-17T16:24:12Z")

</div>

I have been getting this error when trying to run RT DETR on Windows locally

AttributeError: Can’t pickle local object ‘RTDETRDataset.build\_transforms..’

When I run it in Google Colab it works fine.

If i change workers to 0 instead of the default 8 it starts working.  
This doesn’t change the overall results, only makes it slower, or am i wrong?

---

<div class="post-metadata">

**Author:** ![Toxite](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/toxite/32/123_2.png) [@Toxite](https://community.ultralytics.com/u/Toxite)\
**Post date:** [November 17, 2025, 9:44pm UTC](https://community.ultralytics.com/t/rt-detr-cant-pickle-local-object/1638/2 "2025-11-17T21:44:09Z")

</div>

What’s the full traceback?

---

<div class="post-metadata">

**Author:** ![Rodrigo\_M](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/rodrigo_m/32/705_2.png) [@Rodrigo\_M](https://community.ultralytics.com/u/Rodrigo_M)\
**Post date:** [November 20, 2025, 8:09pm UTC](https://community.ultralytics.com/t/rt-detr-cant-pickle-local-object/1638/3 "2025-11-20T20:09:43Z")

</div>

I dont have it.

I put workers=0 in the params and know it seems to be working

---

<div class="post-metadata">

**Author:** ![Toxite](https://sea1.discourse-cdn.com/flex001/user_avatar/community.ultralytics.com/toxite/32/123_2.png) [@Toxite](https://community.ultralytics.com/u/Toxite)\
**Post date:** [November 20, 2025, 11:16pm UTC](https://community.ultralytics.com/t/rt-detr-cant-pickle-local-object/1638/4 "2025-11-20T23:16:46Z")

</div>

> [@Rodrigo\_M](#):
>
> If i change workers to 0 instead of the default 8 it starts working.  
> This doesn’t change the overall results, only makes it slower, or am i wrong?

It would be similar, but not exactly the same due to randomness differences
