-
Notifications
You must be signed in to change notification settings - Fork 39
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
UndefRefError: access to undefined reference #3
Comments
Any chance you can narrow this down a bit? If you can figure out the minimal type definition that triggers this, it should be easy to fix. |
Looks like it fails for all
|
This is really interesting. It doesn't fail for all non-symbol keys; for example, it works for integer keys/integer values.
julia> x1 = Dict(:a => :a); BSON.@save "test.bson" x1
julia> x2= Dict(:a => "a"); BSON.@save "test.bson" x2
julia> x3= Dict(:a => 1); BSON.@save "test.bson" x3
julia> x4 = Dict("a" => :a); BSON.@save "test.bson" x4
ERROR: UndefRefError: access to undefined reference
Stacktrace:
[1] lower(::Array{String,1}) at /Users/dilum/.julia/v0.6/BSON/src/extensions.jl:60
[2] _lower_recursive(::Array{String,1}, ::ObjectIdDict, ::Array{Any,1}) at /Users/dilum/.julia/v0.6/BSON/src/write.jl:62
[3] applychildren!(::BSON.##7#11{ObjectIdDict,Array{Any,1}}, ::Array{Any,1}) at /Users/dilum/.julia/v0.6/BSON/src/BSON.jl:25
[4] _lower_recursive(::Array{Any,1}, ::ObjectIdDict, ::Array{Any,1}) at /Users/dilum/.julia/v0.6/BSON/src/write.jl:62
[5] applychildren!(::BSON.##7#11{ObjectIdDict,Array{Any,1}}, ::Dict{Symbol,Any}) at /Users/dilum/.julia/v0.6/BSON/src/BSON.jl:18
[6] _lower_recursive(::Dict{String,Symbol}, ::ObjectIdDict, ::Array{Any,1}) at /Users/dilum/.julia/v0.6/BSON/src/write.jl:62
[7] applychildren!(::BSON.##7#11{ObjectIdDict,Array{Any,1}}, ::Dict{Symbol,Any}) at /Users/dilum/.julia/v0.6/BSON/src/BSON.jl:18
[8] _lower_recursive(::Dict{Symbol,Dict{String,Symbol}}, ::ObjectIdDict, ::Array{Any,1}) at /Users/dilum/.julia/v0.6/BSON/src/write.jl:62
[9] lower_recursive(::Dict{Symbol,Dict{String,Symbol}}) at /Users/dilum/.julia/v0.6/BSON/src/write.jl:73
[10] open(::BSON.##16#17{Dict{Symbol,Dict{String,Symbol}}}, ::String, ::String) at ./iostream.jl:152
[11] bson(::String, ::Dict{Symbol,Dict{String,Symbol}}) at /Users/dilum/.julia/v0.6/BSON/src/write.jl:83
julia> x5 = Dict("a" => "a"); BSON.@save "test.bson" x5
ERROR: UndefRefError: access to undefined reference
Stacktrace:
julia> x6 = Dict("a" => 1); BSON.@save "test.bson" x6
ERROR: UndefRefError: access to undefined reference
Stacktrace:
julia> x7 = Dict(1 => :a); BSON.@save "test.bson" x7
ERROR: UndefRefError: access to undefined reference
Stacktrace:
julia> x8 = Dict(1 => "a"); BSON.@save "test.bson" x8
ERROR: UndefRefError: access to undefined reference
Stacktrace:
julia> x9 = Dict(1 => 1); BSON.@save "test.bson" x9
julia> |
This works: julia> BSON.bson("test.bson", Dict(:a => 1, :b => Dict(:c => 3, :d => Dict(:e => 5) ) ))
julia> And this works: julia> BSON.bson("test.bson", Dict(:a => 1, :b => Dict(:c => 3, :d => Dict(5 => 5) ) ))
julia> And this also works: julia> BSON.bson("test.bson", Dict(:a => 1, :b => Dict(:c => 3, :d => Dict(1.23 => 5) ) ))
julia> But this does NOT work: julia> BSON.bson("test.bson", Dict(:a => 1, :b => Dict(:c => 3, :d => Dict("e" => 5) ) ))
ERROR: UndefRefError: access to undefined reference
Stacktrace:
[1] lower(::Array{String,1}) at /Users/dilum/.julia/v0.6/BSON/src/extensions.jl:60
[2] _lower_recursive(::Array{String,1}, ::ObjectIdDict, ::Array{Any,1}) at /Users/dilum/.julia/v0.6/BSON/src/write.jl:62
[3] applychildren!(::BSON.##7#11{ObjectIdDict,Array{Any,1}}, ::Array{Any,1}) at /Users/dilum/.julia/v0.6/BSON/src/BSON.jl:25
[4] _lower_recursive(::Array{Any,1}, ::ObjectIdDict, ::Array{Any,1}) at /Users/dilum/.julia/v0.6/BSON/src/write.jl:62
[5] applychildren!(::BSON.##7#11{ObjectIdDict,Array{Any,1}}, ::Dict{Symbol,Any}) at /Users/dilum/.julia/v0.6/BSON/src/BSON.jl:18
[6] _lower_recursive(::Dict{String,Int64}, ::ObjectIdDict, ::Array{Any,1}) at /Users/dilum/.julia/v0.6/BSON/src/write.jl:62
[7] applychildren!(::BSON.##7#11{ObjectIdDict,Array{Any,1}}, ::Dict{Symbol,Any}) at /Users/dilum/.julia/v0.6/BSON/src/BSON.jl:18
[8] _lower_recursive(::Dict{Symbol,Any}, ::ObjectIdDict, ::Array{Any,1}) at /Users/dilum/.julia/v0.6/BSON/src/write.jl:62
[9] applychildren!(::BSON.##7#11{ObjectIdDict,Array{Any,1}}, ::Dict{Symbol,Any}) at /Users/dilum/.julia/v0.6/BSON/src/BSON.jl:18
[10] _lower_recursive(::Dict{Symbol,Any}, ::ObjectIdDict, ::Array{Any,1}) at /Users/dilum/.julia/v0.6/BSON/src/write.jl:62
[11] lower_recursive(::Dict{Symbol,Any}) at /Users/dilum/.julia/v0.6/BSON/src/write.jl:73
[12] open(::BSON.##16#17{Dict{Symbol,Any}}, ::String, ::String) at ./iostream.jl:152
[13] bson(::String, ::Dict{Symbol,Any}) at /Users/dilum/.julia/v0.6/BSON/src/write.jl:83
julia> |
So it looks like you can't have a dict with non-symbol keys anywhere inside the object you are trying to save - with the very weird exception of numerical keys and numerical values. |
|
Disregard my previous comment - see better PR here: #7 |
The following code produces this error, too. using StochasticDiffEq, BSON
function lorenz(du,u,p,t)
du[1] = 10.0(u[2]-u[1])
du[2] = u[1]*(28.0-u[3]) - u[2]
du[3] = u[1]*u[2] - (8/3)*u[3]
end
function σ_lorenz(du,u,p,t)
du[1] = 3.0
du[2] = 3.0
du[3] = 3.0
end
prob_sde_lorenz = SDEProblem(lorenz,σ_lorenz,[1.0,0.0,0.0],(0.0,10.0))
sol = solve(prob_sde_lorenz, SOSRA2())
bson("/tmp/test.bson",Dict(:sol=>sol)) julia> bson("/tmp/test.bson",Dict(:sol=>sol))
ERROR: UndefRefError: access to undefined reference
Stacktrace:
[1] lower at /home/scheme/.julia/packages/BSON/kxdIr/src/extensions.jl:66 [inlined]
[2] _lower_recursive(::Array{Tuple{Float64,Array{Float64,1},Array{Float64,1}},1}, ::IdDict{Any,Any}, ::Array{Any,1}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:62
[3] (::getfield(BSON, Symbol("##7#11")){IdDict{Any,Any},Array{Any,1}})(::Array{Tuple{Float64,Array{Float64,1},Array{Float64,1}},1}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:62
[4] applychildren!(::getfield(BSON, Symbol("##7#11")){IdDict{Any,Any},Array{Any,1}}, ::Array{Any,1}) at /home/scheme/.julia/packages/BSON/kxdIr/src/BSON.jl:28
[5] _lower_recursive(::Array{Any,1}, ::IdDict{Any,Any}, ::Array{Any,1}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:62
[6] (::getfield(BSON, Symbol("##7#11")){IdDict{Any,Any},Array{Any,1}})(::Array{Any,1}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:62
[7] applychildren!(::getfield(BSON, Symbol("##7#11")){IdDict{Any,Any},Array{Any,1}}, ::Dict{Symbol,Any}) at /home/scheme/.julia/packages/BSON/kxdIr/src/BSON.jl:21
[8] _lower_recursive(::DataStructures.DequeBlock{Tuple{Float64,Array{Float64,1},Array{Float64,1}}}, ::IdDict{Any,Any}, ::Array{Any,1}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:62
[9] (::getfield(BSON, Symbol("##7#11")){IdDict{Any,Any},Array{Any,1}})(::DataStructures.DequeBlock{Tuple{Float64,Array{Float64,1},Array{Float64,1}}}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:62
[10] applychildren!(::getfield(BSON, Symbol("##7#11")){IdDict{Any,Any},Array{Any,1}}, ::Array{Any,1}) at /home/scheme/.julia/packages/BSON/kxdIr/src/BSON.jl:28
[11] _lower_recursive(::Array{Any,1}, ::IdDict{Any,Any}, ::Array{Any,1}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:62
[12] (::getfield(BSON, Symbol("##7#11")){IdDict{Any,Any},Array{Any,1}})(::Array{Any,1}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:62
[13] applychildren!(::getfield(BSON, Symbol("##7#11")){IdDict{Any,Any},Array{Any,1}}, ::Dict{Symbol,Any}) at /home/scheme/.julia/packages/BSON/kxdIr/src/BSON.jl:21
[14] _lower_recursive(::DataStructures.Deque{Tuple{Float64,Array{Float64,1},Array{Float64,1}}}, ::IdDict{Any,Any}, ::Array{Any,1}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:62
[15] (::getfield(BSON, Symbol("##7#11")){IdDict{Any,Any},Array{Any,1}})(::DataStructures.Deque{Tuple{Float64,Array{Float64,1},Array{Float64,1}}}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:62
[16] applychildren!(::getfield(BSON, Symbol("##7#11")){IdDict{Any,Any},Array{Any,1}}, ::Array{Any,1}) at /home/scheme/.julia/packages/BSON/kxdIr/src/BSON.jl:28
[17] _lower_recursive(::Array{Any,1}, ::IdDict{Any,Any}, ::Array{Any,1}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:62
[18] (::getfield(BSON, Symbol("##7#11")){IdDict{Any,Any},Array{Any,1}})(::Array{Any,1}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:62
[19] applychildren!(::getfield(BSON, Symbol("##7#11")){IdDict{Any,Any},Array{Any,1}}, ::Dict{Symbol,Any}) at /home/scheme/.julia/packages/BSON/kxdIr/src/BSON.jl:21
[20] _lower_recursive(::DataStructures.Stack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}}, ::IdDict{Any,Any}, ::Array{Any,1}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:62
[21] (::getfield(BSON, Symbol("##7#11")){IdDict{Any,Any},Array{Any,1}})(::DataStructures.Stack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:62
[22] applychildren!(::getfield(BSON, Symbol("##7#11")){IdDict{Any,Any},Array{Any,1}}, ::Array{Any,1}) at /home/scheme/.julia/packages/BSON/kxdIr/src/BSON.jl:28
[23] _lower_recursive(::Array{Any,1}, ::IdDict{Any,Any}, ::Array{Any,1}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:62
[24] (::getfield(BSON, Symbol("##7#11")){IdDict{Any,Any},Array{Any,1}})(::Array{Any,1}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:62
[25] applychildren!(::getfield(BSON, Symbol("##7#11")){IdDict{Any,Any},Array{Any,1}}, ::Dict{Symbol,Any}) at /home/scheme/.julia/packages/BSON/kxdIr/src/BSON.jl:21
[26] _lower_recursive(::DiffEqNoiseProcess.NoiseProcess{Float64,2,Float64,Array{Float64,1},Array{Float64,1},Array{Array{Float64,1},1},typeof(DiffEqNoiseProcess.INPLACE_WHITE_NOISE_DIST),typeof(DiffEqNoiseProcess.INPLACE_WHITE_NOISE_BRIDGE),true,DataStructures.Stack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},ResettableStacks.ResettableStack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},DiffEqNoiseProcess.RSWM{:RSwM3,Float64},RandomNumbers.Xorshifts.Xoroshiro128Plus}, ::IdDict{Any,Any}, ::Array{Any,1}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:62
[27] (::getfield(BSON, Symbol("##7#11")){IdDict{Any,Any},Array{Any,1}})(::DiffEqNoiseProcess.NoiseProcess{Float64,2,Float64,Array{Float64,1},Array{Float64,1},Array{Array{Float64,1},1},typeof(DiffEqNoiseProcess.INPLACE_WHITE_NOISE_DIST),typeof(DiffEqNoiseProcess.INPLACE_WHITE_NOISE_BRIDGE),true,DataStructures.Stack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},ResettableStacks.ResettableStack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},DiffEqNoiseProcess.RSWM{:RSwM3,Float64},RandomNumbers.Xorshifts.Xoroshiro128Plus}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:62
[28] applychildren!(::getfield(BSON, Symbol("##7#11")){IdDict{Any,Any},Array{Any,1}}, ::Array{Any,1}) at /home/scheme/.julia/packages/BSON/kxdIr/src/BSON.jl:28
[29] _lower_recursive(::Array{Any,1}, ::IdDict{Any,Any}, ::Array{Any,1}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:62
[30] (::getfield(BSON, Symbol("##7#11")){IdDict{Any,Any},Array{Any,1}})(::Array{Any,1}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:62
[31] applychildren!(::getfield(BSON, Symbol("##7#11")){IdDict{Any,Any},Array{Any,1}}, ::Dict{Symbol,Any}) at /home/scheme/.julia/packages/BSON/kxdIr/src/BSON.jl:21
[32] _lower_recursive(::RODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},DiffEqNoiseProcess.NoiseProcess{Float64,2,Float64,Array{Float64,1},Array{Float64,1},Array{Array{Float64,1},1},typeof(DiffEqNoiseProcess.INPLACE_WHITE_NOISE_DIST),typeof(DiffEqNoiseProcess.INPLACE_WHITE_NOISE_BRIDGE),true,DataStructures.Stack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},ResettableStacks.ResettableStack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},DiffEqNoiseProcess.RSWM{:RSwM3,Float64},RandomNumbers.Xorshifts.Xoroshiro128Plus},SDEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Nothing,Nothing,SDEFunction{true,typeof(lorenz),typeof(σ_lorenz),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(σ_lorenz),Nothing,Nothing},SOSRA2,StochasticDiffEq.LinearInterpolationData{Array{Array{Float64,1},1},Array{Float64,1}}}, ::IdDict{Any,Any}, ::Array{Any,1}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:62
[33] (::getfield(BSON, Symbol("##7#11")){IdDict{Any,Any},Array{Any,1}})(::RODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},DiffEqNoiseProcess.NoiseProcess{Float64,2,Float64,Array{Float64,1},Array{Float64,1},Array{Array{Float64,1},1},typeof(DiffEqNoiseProcess.INPLACE_WHITE_NOISE_DIST),typeof(DiffEqNoiseProcess.INPLACE_WHITE_NOISE_BRIDGE),true,DataStructures.Stack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},ResettableStacks.ResettableStack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},DiffEqNoiseProcess.RSWM{:RSwM3,Float64},RandomNumbers.Xorshifts.Xoroshiro128Plus},SDEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Nothing,Nothing,SDEFunction{true,typeof(lorenz),typeof(σ_lorenz),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(σ_lorenz),Nothing,Nothing},SOSRA2,StochasticDiffEq.LinearInterpolationData{Array{Array{Float64,1},1},Array{Float64,1}}}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:62
[34] applychildren!(::getfield(BSON, Symbol("##7#11")){IdDict{Any,Any},Array{Any,1}}, ::Dict{Symbol,Any}) at /home/scheme/.julia/packages/BSON/kxdIr/src/BSON.jl:21
[35] _lower_recursive(::Dict{Symbol,RODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},DiffEqNoiseProcess.NoiseProcess{Float64,2,Float64,Array{Float64,1},Array{Float64,1},Array{Array{Float64,1},1},typeof(DiffEqNoiseProcess.INPLACE_WHITE_NOISE_DIST),typeof(DiffEqNoiseProcess.INPLACE_WHITE_NOISE_BRIDGE),true,DataStructures.Stack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},ResettableStacks.ResettableStack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},DiffEqNoiseProcess.RSWM{:RSwM3,Float64},RandomNumbers.Xorshifts.Xoroshiro128Plus},SDEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Nothing,Nothing,SDEFunction{true,typeof(lorenz),typeof(σ_lorenz),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(σ_lorenz),Nothing,Nothing},SOSRA2,StochasticDiffEq.LinearInterpolationData{Array{Array{Float64,1},1},Array{Float64,1}}}}, ::IdDict{Any,Any}, ::Array{Any,1}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:62
[36] lower_recursive(::Dict{Symbol,RODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},DiffEqNoiseProcess.NoiseProcess{Float64,2,Float64,Array{Float64,1},Array{Float64,1},Array{Array{Float64,1},1},typeof(DiffEqNoiseProcess.INPLACE_WHITE_NOISE_DIST),typeof(DiffEqNoiseProcess.INPLACE_WHITE_NOISE_BRIDGE),true,DataStructures.Stack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},ResettableStacks.ResettableStack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},DiffEqNoiseProcess.RSWM{:RSwM3,Float64},RandomNumbers.Xorshifts.Xoroshiro128Plus},SDEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Nothing,Nothing,SDEFunction{true,typeof(lorenz),typeof(σ_lorenz),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(σ_lorenz),Nothing,Nothing},SOSRA2,StochasticDiffEq.LinearInterpolationData{Array{Array{Float64,1},1},Array{Float64,1}}}}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:73
[37] bson(::IOStream, ::Dict{Symbol,RODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},DiffEqNoiseProcess.NoiseProcess{Float64,2,Float64,Array{Float64,1},Array{Float64,1},Array{Array{Float64,1},1},typeof(DiffEqNoiseProcess.INPLACE_WHITE_NOISE_DIST),typeof(DiffEqNoiseProcess.INPLACE_WHITE_NOISE_BRIDGE),true,DataStructures.Stack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},ResettableStacks.ResettableStack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},DiffEqNoiseProcess.RSWM{:RSwM3,Float64},RandomNumbers.Xorshifts.Xoroshiro128Plus},SDEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Nothing,Nothing,SDEFunction{true,typeof(lorenz),typeof(σ_lorenz),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(σ_lorenz),Nothing,Nothing},SOSRA2,StochasticDiffEq.LinearInterpolationData{Array{Array{Float64,1},1},Array{Float64,1}}}}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:81
[38] #14 at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:83 [inlined]
[39] #open#292(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::getfield(BSON, Symbol("##14#15")){Dict{Symbol,RODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},DiffEqNoiseProcess.NoiseProcess{Float64,2,Float64,Array{Float64,1},Array{Float64,1},Array{Array{Float64,1},1},typeof(DiffEqNoiseProcess.INPLACE_WHITE_NOISE_DIST),typeof(DiffEqNoiseProcess.INPLACE_WHITE_NOISE_BRIDGE),true,DataStructures.Stack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},ResettableStacks.ResettableStack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},DiffEqNoiseProcess.RSWM{:RSwM3,Float64},RandomNumbers.Xorshifts.Xoroshiro128Plus},SDEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Nothing,Nothing,SDEFunction{true,typeof(lorenz),typeof(σ_lorenz),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(σ_lorenz),Nothing,Nothing},SOSRA2,StochasticDiffEq.LinearInterpolationData{Array{Array{Float64,1},1},Array{Float64,1}}}}}, ::String, ::Vararg{String,N} where N) at ./iostream.jl:369
[40] open at ./iostream.jl:367 [inlined]
[41] bson(::String, ::Dict{Symbol,RODESolution{Float64,2,Array{Array{Float64,1},1},Nothing,Nothing,Array{Float64,1},DiffEqNoiseProcess.NoiseProcess{Float64,2,Float64,Array{Float64,1},Array{Float64,1},Array{Array{Float64,1},1},typeof(DiffEqNoiseProcess.INPLACE_WHITE_NOISE_DIST),typeof(DiffEqNoiseProcess.INPLACE_WHITE_NOISE_BRIDGE),true,DataStructures.Stack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},ResettableStacks.ResettableStack{Tuple{Float64,Array{Float64,1},Array{Float64,1}}},DiffEqNoiseProcess.RSWM{:RSwM3,Float64},RandomNumbers.Xorshifts.Xoroshiro128Plus},SDEProblem{Array{Float64,1},Tuple{Float64,Float64},true,Nothing,Nothing,SDEFunction{true,typeof(lorenz),typeof(σ_lorenz),UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(σ_lorenz),Nothing,Nothing},SOSRA2,StochasticDiffEq.LinearInterpolationData{Array{Array{Float64,1},1},Array{Float64,1}}}}) at /home/scheme/.julia/packages/BSON/kxdIr/src/write.jl:83
[42] top-level scope at none:0
julia> |
The same error occurs when saving an optimizer in Flux: FluxML/Flux.jl#737 As far as I can see, the underlying problem is that it is not possible to save an |
Actually, the underlying problem here is that currently BSON.jl cannot handle arrays with undefined values. The issue for tracking this is: #43 Not being able to save certain Dicts is just a symptom of #43. The underlying implementation of Dict means that Dicts will often contain (under the hood) one or more Arrays with undefined values. In order to save/load the Dict, you need to be able to save/load the Arrays. Once #43 is solved, there will be no problem saving/loading any kind of Dict. |
examples in #3 (comment) all work now, this should be closed |
Before we close this issue, I think that we should take the examples from that issue and add them to the test suite of this package. |
I note that this error also happens in the absence of undef entries.
|
Also getting this error using the AbstractFFTs package.
I'm fairly new to Julia, so I'm not sure If there's more information I can provide to help pinpoint how/where this error is occurring. |
Nice package, Mike! I found this obscure error message when saving this custom AbstractArray type from SASLib.jl.
The text was updated successfully, but these errors were encountered: