Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: Could not find a format to read the specified file in single-image mode #256

Open
jongh222 opened this issue Oct 15, 2020 · 8 comments

Comments

@jongh222
Copy link

Traceback (most recent call last):
File "style.py", line 167, in
main()
File "style.py", line 117, in main
style_target = get_img(options.style)
File "src\utils.py", line 18, in get_img
img = imageio.imread(src, pilmode='RGB') # misc.imresize(, (256, 256, 3))
File "C:\Users\Churi\anaconda3\envs\tf-gpu\lib\site-packages\imageio\core\functions.py", line 265, in imread
reader = read(uri, format, "i", **kwargs)
File "C:\Users\Churi\anaconda3\envs\tf-gpu\lib\site-packages\imageio\core\functions.py", line 182, in get_reader
"Could not find a format to read the specified file in %s mode" % modename
ValueError: Could not find a format to read the specified file in single-image mode

It's not a computer problem. This is because both computers get that error.

@akhrrbk
Copy link

akhrrbk commented Oct 25, 2020

this is where I am stuck now

@akhrrbk
Copy link

akhrrbk commented Oct 25, 2020

did you fix it?

@jongh222
Copy link
Author

did you fix it?

No...

@vincentlorant
Copy link

vincentlorant commented Nov 23, 2020

if you did specify one, is the path you set for the --test arg correct?

@jongh222
Copy link
Author

if you did specify one, is the path you set for the --test arg correct?

Not a test. train.

@alexandrutitirig
Copy link

Hi guys,

I have the same problem/error.

2021-03-10 22:55:17.907951: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll
Traceback (most recent call last):
File "style.py", line 167, in
main()
File "style.py", line 117, in main
style_target = get_img(options.style)
File "src\utils.py", line 18, in get_img
img = imageio.imread(src, pilmode='RGB') # misc.imresize(, (256, 256, 3))
File "C:\Users\Dorian\Anaconda3\envs\tf-gpu\lib\site-packages\imageio\core\functions.py", line 265, in imread
reader = read(uri, format, "i", **kwargs)
File "C:\Users\Dorian\Anaconda3\envs\tf-gpu\lib\site-packages\imageio\core\functions.py", line 182, in get_reader
"Could not find a format to read the specified file in %s mode" % modename
ValueError: Could not find a format to read the specified file in single-image mode

Did anyone get the solution?
Thank you!

@monikrish2698
Copy link

Guys I had the same issue. The issue is with the image that we are using. Download the image with jpg format. Don't download an image in web format with jpg extension. It worked for me!

@enzomasson25
Copy link

Try to delete the data folder and run setup.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants