FileNotFoundError: [Errno 2] No such file or directory: '../resized/resized/51cf8b8d7e0d9c0839d2d1b1_1.jpg'
Closed this issue · 0 comments
monajalal commented
[jalal@goku scripts]$ python prepro_images.py
parsed input parameters:
{
"input_json": "../data/data_news.json",
"output_h5": "../data/data_news",
"images_root": "../resized/"
}
processing 0/489229 (0.00% done)
processing 1000/489229 (0.20% done)
processing 2000/489229 (0.41% done)
processing 3000/489229 (0.61% done)
processing 4000/489229 (0.82% done)
processing 5000/489229 (1.02% done)
processing 6000/489229 (1.23% done)
processing 7000/489229 (1.43% done)
processing 8000/489229 (1.64% done)
processing 9000/489229 (1.84% done)
processing 10000/489229 (2.04% done)
processing 11000/489229 (2.25% done)
processing 12000/489229 (2.45% done)
processing 13000/489229 (2.66% done)
processing 14000/489229 (2.86% done)
processing 15000/489229 (3.07% done)
processing 16000/489229 (3.27% done)
processing 17000/489229 (3.47% done)
processing 18000/489229 (3.68% done)
processing 19000/489229 (3.88% done)
processing 20000/489229 (4.09% done)
processing 21000/489229 (4.29% done)
Traceback (most recent call last):
File "prepro_images.py", line 87, in <module>
main(params)
File "prepro_images.py", line 53, in main
I = imread(os.path.join(params['images_root'], img['file_path']))
File "/home/grad3/jalal/.local/lib/python3.6/site-packages/numpy/lib/utils.py", line 101, in newfunc
return func(*args, **kwds)
File "/scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages/scipy/misc/pilutil.py", line 164, in imread
im = Image.open(name)
File "/scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages/PIL/Image.py", line 2766, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '../resized/resized/51cf8b8d7e0d9c0839d2d1b1_1.jpg'
I have the images here: /scratch3/GoodNews/resized/resized
What am I doing wrong?
The file doesn't exist in the images
[jalal@goku resized]$ ls 51cf8b8d7e0d9c0839d2d1b1_1.jpg
ls: cannot access 51cf8b8d7e0d9c0839d2d1b1_1.jpg: No such file or directory