title: Image not loading (Jupyter notebook)
body: <p>Im trying to load an image to Jupyter notebook to use it in Tensorflow, Im using this Code below :</p>
  <pre><code>import numpy as np
  from pathlib import Path    
  import pandas as pd    
  import matplotlib.pyplot as plt    
  import sklearn.model_selection as train_test_split    
  import tensorflow as tf    
  from PIL import Image    
  import os    
  from keras.utils import to_categorical    
  from keras.models import Sequential    
  from keras.layers import Conv2D, MaxPool2D, Dense,Flatten, Dropout 
  
  
  
  data= []    
  labels = []    
  classes = 43    
  cur_path = os.getcwd()
  
  for i in range(classes) :     
      path = os.path.join(cur_path,'Dataset\Train', str(i))    
      images = os.listdir(path)
  
  for a in images :        
      try: 
          image = Image.open(path + '\\'  + a)    
          image.resize(30,30)    
          image.show()    
          image = np.array(image)    
          data.append(image)    
          labels.append(i)
  
      except:    
          print(&quot;error loading image&quot;)
  
  data = np.array(data)    
  labels = np.array(labels)
  </code></pre>
  <p>Unfortunately im having this error message :<code>error loading image</code>
  Does anyone have any idea?</p>
  <p>Update : Removed the try and except ,</p>
  <p>for a in images :</p>
  <pre><code> image = Image.open(path + '\\' + a) 
  
   image.resize(30,30) 
  
   display(image) 
  
   image = np.array(image) 
  
   data = np.array(data) 
  
   labels = np.array(labels)
  </code></pre>
  <p>error  :</p>
  <p>ValueError<br />
  Traceback (most recent call last)
   in 
  2
  3         image = Image.open(path + '\'  + a)</p>
  <p>----&gt; 4         image.resize(30,30)</p>
  <pre><code>  5         display(image)
  
    6         image = np.array(image)
  </code></pre>
  <p>~\anaconda3\lib\site-packages\PIL\Image.py in resize(self, size, resample, box, reducing_gap)
  1883                 )
  1884             ]
  -&gt; 1885             raise ValueError(</p>
  <p>1886                 message + &quot; Use &quot; + &quot;, &quot;.join(filters[:-1]) + &quot; or &quot; +
  filters[-1]</p>
  <p>1887             )</p>
  <p>ValueError: Unknown resampling filter (30). Use Image.NEAREST (0),</p>
  <p>Image.LANCZOS (1), Image.BILINEAR (2), Image.BICUBIC (3), Image.BOX (4) or</p>
  <p>Image.HAMMING (5)</p>