# Error after 501 steps

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ferror-after-501-steps%2F29321%3E%5C
**Category:** 🤗Transformers\
**Created:** [January 10, 2023, 7:44pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ferror-after-501-steps%2F29321 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fdepremrik)%5C
**Post date:** [January 10, 2023, 7:44pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ferror-after-501-steps%2F29321%2F1 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FAgentWaller)%5C
**Post date:** [April 25, 2023, 12:51pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ferror-after-501-steps%2F29321%2F2 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FDharamanand)%5C
**Post date:** [April 22, 2024, 12:52am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ferror-after-501-steps%2F29321%2F3 "2024-04-22T00:52:36Z")

</div>

did you find the fix ??
