Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tuple-of-type-of-closure cannot be reloaded #37

Closed
cstjean opened this issue Sep 4, 2017 · 1 comment · Fixed by #476
Closed

Tuple-of-type-of-closure cannot be reloaded #37

cstjean opened this issue Sep 4, 2017 · 1 comment · Fixed by #476

Comments

@cstjean
Copy link

cstjean commented Sep 4, 2017

On 0.6,

julia> using FileIO, JLD2

julia> myfun() = x -> x
myfun (generic function with 1 method)

julia> save("test2.jld2", "groups", (typeof(myfun()),))

#### new session

julia> using FileIO, JLD2

julia> groups2 = load("test2.jld2", "groups")
Error encountered while loading "/Users/cedric/Programa/RL/notebooks/test2.jld2".
Fatal error:
ERROR: TypeError: read_data: in typeassert, expected DataType, got JLD2.UnknownType{String}
Stacktrace:
 [1] jlconvert at /Users/cedric/.julia/v0.6/JLD2/src/data.jl:1229 [inlined]
 [2] read_scalar at /Users/cedric/.julia/v0.6/JLD2/src/dataio.jl:37 [inlined]
 [3] read_data(::JLD2.JLDFile{JLD2.MmapIO}, ::JLD2.ReadRepresentation{Tuple{DataType},JLD2.OnDiskRepresentation{(0,),Tuple{DataType},Tuple{JLD2.OnDiskRepresentation{(0, 16),Tuple{String,Array{Any,1}},Tuple{JLD2.Vlen{String},JLD2.Vlen{JLD2.RelOffset}}}()}}()}, ::Array{JLD2.ReadAttribute,1}) at /Users/cedric/.julia/v0.6/JLD2/src/datasets.jl:171
 [4] read_data(::JLD2.JLDFile{JLD2.MmapIO}, ::JLD2.ReadDataspace, ::UInt8, ::Int64, ::Int64, ::Int64, ::UInt16, ::JLD2.RelOffset, ::Array{JLD2.ReadAttribute,1}) at /Users/cedric/.julia/v0.6/JLD2/src/datasets.jl:149
 [5] load_dataset(::JLD2.JLDFile{JLD2.MmapIO}, ::JLD2.RelOffset) at /Users/cedric/.julia/v0.6/JLD2/src/datasets.jl:92
 [6] getindex(::JLD2.Group{JLD2.JLDFile{JLD2.MmapIO}}, ::String) at /Users/cedric/.julia/v0.6/JLD2/src/groups.jl:108

EDIT: I expected to see ReconstructedType, instead of an error.

@JonasIsensee
Copy link
Collaborator

This still errors as of today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants