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

**URL:** <https://discuss.huggingface.co/t/trainer-train-padding-error-but-it-was-working-before/6070>\
**Category:** 🤗Transformers\
**Created:** [May 7, 2021, 6:04pm UTC](https://discuss.huggingface.co/t/trainer-train-padding-error-but-it-was-working-before/6070 "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](https://discuss.huggingface.co/u/jolurf)\
**Post date:** [May 7, 2021, 6:04pm UTC](https://discuss.huggingface.co/t/trainer-train-padding-error-but-it-was-working-before/6070/1 "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)**
