The error message is a bit hard to understand, but it usually raised by PIL, e.g. if the image file is broken.
You could debug it further by checking which image is causing this issue (e.g. print the index in Dataset.__getitem__ and try to load the image directly) and either fix the image (download it again) or remove it.