I’d like to save variables for later. To do this, I installed the JLD2 package. But when I try to save, I get the following error:
Error Details
julia> using JLD2
julia> hello = "world"
"world"
julia> foo = :bar
:bar
julia> @save "example.jld2" hello foo
ERROR: type DataType has no field mutable
Stacktrace:
[1] getproperty
@ .\Base.jl:37 [inlined]
[2] ismutabletype(x::DataType)
@ JLD2 C:\Users\USER\.julia\packages\JLD2\qncOK\src\datasets.jl:538
[3] write_dataset(f::JLD2.JLDFile{JLD2.MmapIO}, dataspace::JLD2.WriteDataspace{0, Tuple{}}, datatype::JLD2.BasicDatatype, odr::JLD2.FixedLengthString{String}, data::String, wsession::JLD2.JLDWriteSession{Dict{UInt64, JLD2.RelOffset}})
@ JLD2 C:\Users\USER\.julia\packages\JLD2\qncOK\src\datasets.jl:428
[4] write_dataset
@ C:\Users\USER\.julia\packages\JLD2\qncOK\src\datasets.jl:542 [inlined]
[5] write(g::JLD2.Group{JLD2.JLDFile{JLD2.MmapIO}}, name::String, obj::String, wsession::JLD2.JLDWriteSession{Dict{UInt64, JLD2.RelOffset}})
@ JLD2 C:\Users\USER\.julia\packages\JLD2\qncOK\src\groups.jl:119
[6] write(f::JLD2.JLDFile{JLD2.MmapIO}, name::String, obj::String, wsession::JLD2.JLDWriteSession{Dict{UInt64, JLD2.RelOffset}})
@ JLD2 C:\Users\USER\.julia\packages\JLD2\qncOK\src\JLD2.jl:347
[7] top-level scope
@ C:\Users\USER\.julia\packages\JLD2\qncOK\src\loadsave.jl:66
What’s going wrong and what can I do to fix this? Did I do something wrong? Is there a better way to save variables for later?