Search code examples
google-colaboratoryimread

Problem opening an image using imread with Google Colab


I am trying to follow a tutorial in the Deep Learning for Dummies book.

I am getting an error message when trying to open an image (using imread) that I have downloaded on Google Colab.

The error message:

OSError: Cannot seek back after getting firstbytes!

Here is the code on Google Colab; I'm sure it's a trivial thing, but I'm not sure where the error is coming from. Any help appreciated


Solution

  • From the skimage.io documentation here: imread documentation we can see that the argument of imread() must be the string of a filename and not an object (like archive.open(filename))