When I build a deep learning image dataset and use Spyder to package it, the following error occurs, what should I do?
Traceback (most recent call last):
File “”, line 1, in
runfile(‘D:/360Downloads/VS/1203_2.py’, wdir=‘D:/360Downloads/VS’)
File “C:\Users\16147\Anaconda3\envs\tensorflow\lib\site-packages\spyder_kernels\customize\spydercustomize.py”, line 827, in runfile
execfile(filename, namespace)
File “C:\Users\16147\Anaconda3\envs\tensorflow\lib\site-packages\spyder_kernels\customize\spydercustomize.py”, line 110, in execfile
exec(compile(f.read(), filename, ‘exec’), namespace)
File “D:/360Downloads/VS/1203_2.py”, line 93, in
x_train, y_train,x_val,y_val=datacreate(root)
File “D:/360Downloads/VS/1203_2.py”, line 53, in datacreate
for batch_index, batch in train_data:
File “D:/360Downloads/VS/1203_2.py”, line 37, in getitem
img = Image.open(root+fn).convert(‘L’).resize((image_size,image_size))
File “C:\Users\16147\Anaconda3\envs\tensorflow\lib\site-packages\PIL\Image.py”, line 2766, in open
fp = builtins.open(filename, “rb”)
OSError: [Errno 22] Invalid argument: ‘C:/Users/16147/Desktop/ss/shuiguo2/C:/Users/16147/Desktop/ss/shuiguo2/01h.bmp’