title: pytorch dataset python script does not run in colab
body: <p>I've decided to make reusable scripts for frequently used classes. So, i made one for my image dataset and imported it in collab. I can create the dataset object successfully but can't get data from it.</p>
  <p>here is my dataset code:
  <a href="https://pastebin.com/XfAiTe3A" rel="nofollow noreferrer">https://pastebin.com/XfAiTe3A</a></p>
  <p>Here is how i use the script in google colab:</p>
  <pre><code>from imageDataset import customDataset
  dataset = customDataset(train_data)\
  dataset[0]
  </code></pre>
  <p>Here is the error:</p>
  <pre><code>     16         target = self.targets[index]
  ---&gt; 17         image = io.imread(self.image_paths[index])
       18 
       19         if self.augmentations is not None:
  
  SystemError: &lt;built-in function imread&gt; returned NULL without setting an error
  </code></pre>
  <p>But if i copy paste the code in a jupyter cell , i can use the class like i normally  do. What I'm i doing wrong?</p>
  <p>any help is appreciated, thanks</p>