Can't access jld data from julia0.7

Hello,
I just upgraded to 0.7 on my way to 1.0 and noticed that I couldn’t install the JLD package.

julia> Pkg.add("JLD")
WARNING: Base.Pkg is deprecated, run `using Pkg` instead
 in module Main
   Cloning default registries into /data1/homes/pee3/.julia/registries
   Cloning registry General from "https://github.com/JuliaRegistries/General.git"
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package JLD [4138dd39]:
 JLD [4138dd39] log:
 ├─possible versions are: [0.5.0-0.5.9, 0.6.0-0.6.11, 0.8.0-0.8.3] or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions [0.5.0-0.5.9, 0.6.0-0.6.11, 0.8.0-0.8.3]
 └─restricted by julia compatibility requirements to versions: uninstalled — no versions left

I was able to install the JLD2 package, but with that I was not able to load some old data that I had saved in jld format.

using JLD2
@load("very/important/data.jld")
ERROR: LoadError: ArgumentError: only JLD2 files are presently supported

Is there a way I can either open jld files with JLD2 or convert jld files to jld2 files? This data is kind of important.
Thanks,
Philip

1 Like

I think the easiest way will be to download julia v0.6.4 from https://julialang.org/downloads/
and use JLD.jl to load the file and then save it with JLD2.jl.

That may be somewhat tedious but if you have lots of files, you can probably write a small script to automate that.
i.e.

cd("very/important/")
for file in readdir()
     if endswith(file, ".jld")
         data = load(file)
         save(file*"2", data)
    end
end
2 Likes