# Error after 501 steps

**URL:** <https://discuss.huggingface.co/t/error-after-501-steps/29321>\
**Category:** 🤗Transformers\
**Created:** [January 10, 2023, 7:44pm UTC](https://discuss.huggingface.co/t/error-after-501-steps/29321 "2023-01-10T19:44:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![depremrik](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@depremrik](https://discuss.huggingface.co/u/depremrik)\
**Post date:** [January 10, 2023, 7:44pm UTC](https://discuss.huggingface.co/t/error-after-501-steps/29321/1 "2023-01-10T19:44:53Z")

</div>

I’m trying to finetune a text generation model but it keeps getting an error after 501 steps. Not sure how to resolve this.  
TypeError: cannot unpack non-iterable NoneType object

 ![Screenshot_1918](https://us1.discourse-cdn.com/hellohellohello/original/2X/2/2a2d239a45342ce722e58fd633dccf5af0df7793.png)

---

<div class="post-metadata">

**Author:** ![AgentWaller](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@AgentWaller](https://discuss.huggingface.co/u/AgentWaller)\
**Post date:** [April 25, 2023, 12:51pm UTC](https://discuss.huggingface.co/t/error-after-501-steps/29321/2 "2023-04-25T12:51:40Z")

</div>

@depremrik, I’ve encountered the exact same problem when fine-tuning FLAN-T5. Were you ever able to figure out what the problem was?

---

<div class="post-metadata">

**Author:** ![Dharamanand](https://avatars.discourse-cdn.com/v4/letter/d/9de053/32.png) [@Dharamanand](https://discuss.huggingface.co/u/Dharamanand)\
**Post date:** [April 22, 2024, 12:52am UTC](https://discuss.huggingface.co/t/error-after-501-steps/29321/3 "2024-04-22T00:52:36Z")

</div>

did you find the fix ??
