Input/output error ...train_0.jpg

Getting an error while running lesson3-planet:

OSError Traceback (most recent call last)
in ()
----> 1 data = (src.transform(tfms, size=128)
2 .databunch().normalize(imagenet_stats))

7 frames
/usr/local/lib/python3.6/dist-packages/PIL/Image.py in open(fp, mode)
2528
2529 if filename:
-> 2530 fp = builtins.open(filename, “rb”)
2531 exclusive_fp = True
2532

OSError: [Errno 5] Input/output error: ‘/content/gdrive/My Drive/Colab Notebooks/fastai-v3/planet/train-jpg/train_0.jpg’

Looks like it is an IO error with my GDrive but check paths and ls commands shows that everything is in the right place. I`m using GOOGLE COLAB.

1 Like

I am having the same issue when using Google Colab.

/usr/local/lib/python3.6/dist-packages/PIL/Image.py in open(fp, mode)
   2764 
   2765     if filename:
-> 2766         fp = builtins.open(filename, "rb")
   2767         exclusive_fp = True
   2768 

OSError: [Errno 5] Input/output error: '/content/drive/My Drive/data/cocoapi/images/train2014/COCO_train2014_000000283631.jpg'

This post says that the file needs to be copied out of Google Drive.