When I change the content file and styleFile vars for just the file path, it works fine. So I know that the content file is there and that it can find it.
I must be passing a variable incorrectly to the other python script. I've been trying but I can't google myself out of this one at the moment.
import os listStyles = ['/content/neural-style-tf/styles/1.png'] listContent = ['/content/neural-style-tf/image_input/00078.png'] i = 0 for imageName in listStyles: stylefile = imageName contentfile = listContent[i] i = i + 1 print (stylefile) print (contentfile) print ('') !python neural_style.py --content_img contentfile --style_imgs stylefile Output:
/content/neural-style-tf/styles/1.png /content/neural-style-tf/image_input/00078.png Traceback (most recent call last): File "neural_style.py", line 889, in <module> main() File "neural_style.py", line 886, in main else: render_single_image() File "neural_style.py", line 849, in render_single_image content_img = get_content_image(args.content_img) File "neural_style.py", line 715, in get_content_image check_image(img, path) File "neural_style.py", line 552, in check_image raise OSError(errno.ENOENT, "No such file", path) FileNotFoundError: [Errno 2] No such file: './image_input/contentfile'