Hi,
I’m trying to load some old JLD files that were created in Julia 0.6 for use in Julia 1.1, however there seems to be issue with loading the Bool
.
I have a small sample to demonstrate
Created in 0.6
using JLD
mutable struct foo
is_true::Bool
name::String
end
a= foo(true, "Test true")
file_path = "c:\\temp\\foo.jld"
file_dir, file_name = splitdir(file_path)
file_prefix, file_ext = splitext(file_name)
JLD.save(file_path, file_prefix, a, compress=false)
Load in Julia 1.1
obj = JLD.load(file_path, file_prefix)
stored type Core.Bool does not match currently loaded type
Stacktrace:
[1] macro expansion at .\logging.jl:320 [inlined]
[2] jldatatype(::JLD.JldFile, ::HDF5.HDF5Datatype) at C:\Program Files\ReSolver.DistributedJulia\depot\packages\JLD\1BoSz\src\jld_types.jl:703
[3] macro expansion at .\logging.jl:316 [inlined]
[4] jldatatype(::JLD.JldFile, ::HDF5.HDF5Datatype) at C:\Program Files\ReSolver.DistributedJulia\depot\packages\JLD\1BoSz\src\jld_types.jl:703
[5] read(::JLD.JldDataset) at C:\Program Files\ReSolver.DistributedJulia\depot\packages\JLD\1BoSz\src\JLD.jl:370
[6] read(::JLD.JldFile, ::String) at C:\Program Files\ReSolver.DistributedJulia\depot\packages\JLD\1BoSz\src\JLD.jl:346
[7] #42 at C:\Program Files\ReSolver.DistributedJulia\depot\packages\JLD\1BoSz\src\JLD.jl:1240 [inlined]
[8] #jldopen#14(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::getfield(JLD, Symbol("##42#43")){String}, ::String, ::Vararg{String,N} where N) at C:\Program Files\ReSolver.DistributedJulia\depot\packages\JLD\1BoSz\src\JLD.jl:246
[9] jldopen at C:\Program Files\ReSolver.DistributedJulia\depot\packages\JLD\1BoSz\src\JLD.jl:244 [inlined]
[10] load at C:\Program Files\ReSolver.DistributedJulia\depot\packages\JLD\1BoSz\src\JLD.jl:1239 [inlined]
[11] #load#13(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::String, ::String) at C:\Program Files\ReSolver.DistributedJulia\depot\packages\FileIO\YJO7Z\src\loadsave.jl:118
[12] load(::String, ::String) at C:\Program Files\ReSolver.DistributedJulia\depot\packages\FileIO\YJO7Z\src\loadsave.jl:118
[13] top-level scope at In[18]:1
Thanks,
Adrian.