I think you might have RGBA images in your dataset! The error in your title is not the one you get in the script, BTW. This is related to the number of channels of the images (in that case 4) and the number of channels in your transforms (3).
When you call image = Image.open(open(imagePath, 'rb')) (BTW you should replace that by image = Image.open(imagePath) which works just as well), add .convert('RGB').
Be aware that this will transform the background (which is likely 0 by default, since transparency will hide it) in full black. This is not ideal and you should verify your images to determine what you should do with transparent ones. If the background is supposed to be white, you can use numpy to modify the images so that you replace transparent pixels with white ones. I also suggest that you do that offline before training instead of during training, as it will take unnecessary processing time…