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

Error DataType has no field ninitialized when saving Tuple #327

Closed
jlapeyre opened this issue Jun 9, 2021 · 4 comments · Fixed by #331
Closed

Error DataType has no field ninitialized when saving Tuple #327

jlapeyre opened this issue Jun 9, 2021 · 4 comments · Fixed by #331

Comments

@jlapeyre
Copy link

jlapeyre commented Jun 9, 2021

julia> import JLD2

julia> JLD2.save("tst.jld2", "x", (1,2))
Error encountered while save FileIO.File{FileIO.DataFormat{:JLD2}, String}("tst.jld2").

Fatal error:
ERROR: type DataType has no field ninitialized
...

[033835bb] JLD2 v0.4.9

Julia: Version 1.7.0-DEV.1290, 6e8754337a*

EDIT:
The bug does not occur in
Julia 1.7.0-DEV.961, 2435f96f92*

@BoundaryValueProblems
Copy link
Contributor

Yes, I have exactly the same problem.

@JonasIsensee
Copy link
Collaborator

As I mentioned in #320
Julia is changing internals too fast for me to keep up at the moment.

#320 (comment)

The way forward is to figure out what has changed in julia and change the code in JLD2 accordingly.
(Using @static if VERSION < v"1.7.0-A" blocks to keep compatibility to earlier versions)

@JonasIsensee
Copy link
Collaborator

This appears to be the culprit
JuliaLang/julia#41018

@PaulSoderlind
Copy link

another data point: same problem on Julia-1.7.0-beta2 when saving a Dict

using FileIO, JLD2
D = Dict("a"=>"Hazel")
save("test.jld2","D",D)

gives

Error encountered while save File{DataFormat{:JLD2}, String}("test.jld2").                          
                                                  
Fatal error:                                      
ERROR: LoadError: type DataType has no field ninitialized      ...

jw3126 added a commit to jw3126/JLD2.jl that referenced this issue Jun 25, 2021
jw3126 added a commit to jw3126/JLD2.jl that referenced this issue Jun 25, 2021
JonasIsensee added a commit that referenced this issue Jun 27, 2021
fix #327 DataType has no field ninitialized
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants