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

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.