STROTSS icon indicating copy to clipboard operation
STROTSS copied to clipboard

Could not find a format to read the specified file in mode 'i'

Open Dearbreeze opened this issue 5 years ago • 1 comments

Hi Nick!

When l try to run your code I getting this error and l can't solve,so l'm sorry to disturb you.

Traceback (most recent call last): File "styleTransfer.py", line 99, in regions = [[imread(content_path)[:,:,0]*0.+1.], [imread(style_path)[:,:,0]*0.+1.]] File "/home/lyx/anaconda3/lib/python3.6/site-packages/imageio/core/functions.py", line 221, in imread reader = read(uri, format, "i", **kwargs) File "/home/lyx/anaconda3/lib/python3.6/site-packages/imageio/core/functions.py", line 139, in get_reader "Could not find a format to read the specified file " "in mode %r" % mode ValueError: Could not find a format to read the specified file in mode 'i'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "styleTransfer.py", line 101, in regions = [[imread(content_path)[:,:]*0.+1.], [imread(style_path)[:,:]*0.+1.]] File "/home/lyx/anaconda3/lib/python3.6/site-packages/imageio/core/functions.py", line 221, in imread reader = read(uri, format, "i", **kwargs) File "/home/lyx/anaconda3/lib/python3.6/site-packages/imageio/core/functions.py", line 139, in get_reader "Could not find a format to read the specified file " "in mode %r" % mode ValueError: Could not find a format to read the specified file in mode 'i'

My content data set from Coco2014,style data set come from WikiArt. l try Unconstrained Style Transfer,input PATH_TO_CONTENT ,PATH_TO_STYLE and CONTENT_WEIGHT. Looking forward to your reply. Thanks in advance!

Dearbreeze avatar Jun 19 '19 13:06 Dearbreeze

Hi Yunxin, Thanks for trying out the code! I've never encountered that error before. Does the path to the style image or content image have spaces in it? this thread https://github.com/Zulko/moviepy/issues/219 says that that can cause an error like the one you're seeing with imageio. Best, Nick

nkolkin13 avatar Jun 19 '19 14:06 nkolkin13