IOerror: no such file or directory (ENOENT)


#1

I’m trying to load a .jld2 file with the JLD2 package using @load “filename.jld2” command and it had previously worked, however now I’m getting error message: ERROR: IOError: chdir filename: no such file or directory (ENOENT). This same error message pops up when I try to set working directory with cd(“file”). I’m using Julia v1.0.2 Juno/Atom.


#2

It is most likely that the file is not found. Try eg

filesize("/full/path/to/file")

#3

I just did- it says 0. I’m not sure why though? The .jld2 file and the main folder to which it belongs certainly exist and have been used for other analyses.


#4

You can also try isfile, but filesize gives 0 for non-existent paths.

julia> filesize("/non/existent")
0

#5

hm, the isfile command returns False…