load() doesn't check whether file exists before offering alternative IO packages
IanButterworth opened this issue · 0 comments
IanButterworth commented
Here fake/fake.png
doesn't exist. Instead of detecting that the file doesn't exist, FileIO returns file IO package options for the file format .png
that aren't installed.
I believe load
should always be used with files that exist.. so perhaps the first step in load should be checking for isfile()
?
julia> using FileIO
julia> FileIO.load("fake/fake.png")
Errors encountered while loading "fake/fake.png".
All errors:
===========================================
Failed to open fake/fake.png
===========================================
ArgumentError: Package QuartzImageIO not found in current path:
- Run `import Pkg; Pkg.add("QuartzImageIO")` to install the QuartzImageIO package.
===========================================
ArgumentError: Package ImageMagick not found in current path:
- Run `import Pkg; Pkg.add("ImageMagick")` to install the ImageMagick package.
===========================================
Fatal error:
ERROR: Failed to open fake/fake.png
....