# Trainer.train() padding error but it was working before

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftrainer-train-padding-error-but-it-was-working-before%2F6070%3E%5C
**Category:** 🤗Transformers\
**Created:** [May 7, 2021, 6:04pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftrainer-train-padding-error-but-it-was-working-before%2F6070 "2021-05-07T18:04:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jolurf](https://avatars.discourse-cdn.com/v4/letter/j/34f0e0/32.png) [@jolurf](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fjolurf)%5C
**Post date:** [May 7, 2021, 6:04pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Ftrainer-train-padding-error-but-it-was-working-before%2F6070%2F1 "2021-05-07T18:04:07Z")

</div>

My trainer.train() was working perfectly.  
It was running but suddenly, it stopped working and returned the error:

ValueError: Unable to create tensor, you should probably activate padding with ‘padding=True’ to have batched tensors with the same length.

Even if I try to get back to the dataset that was working, it doesn’t work anymore.

> **[Google Colaboratory](https://colab.research.google.com/drive/11SYmLaLQXutW6PFiT5TFedwgUl-2DxQh?usp=sharing)**
