IOerror: no such file or directory (ENOENT)

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.

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

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

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.

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

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

hm, the isfile command returns False…