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

Unclear error when loadDFG and IIF is not imported. #1076

Open
Affie opened this issue Apr 24, 2024 · 0 comments
Open

Unclear error when loadDFG and IIF is not imported. #1076

Affie opened this issue Apr 24, 2024 · 0 comments

Comments

@Affie
Copy link
Member

Affie commented Apr 24, 2024

The error results in calling loadDFG and without import/using IIF/RoME as SolverParams are defined in IIF, find a way to make the error clearer.

ERROR: MethodError: Cannot `convert` an object of type Nothing to an object of type Int64
Stacktrace:
  [1] NoSolverParams(d::Nothing)
    @ DistributedFactorGraphs ~/.julia/dev/DistributedFactorGraphs/src/entities/AbstractDFG.jl:37
  [2] construct
    @ ~/.julia/packages/StructTypes/AK4aM/src/StructTypes.jl:912 [inlined]
  [3] read(::StructTypes.UnorderedStruct, buf::Base.CodeUnits{…}, pos::Int64, len::Int64, b::UInt8, ::Type{…}; kw::@Kwargs{})
    @ JSON3 ~/.julia/packages/JSON3/jSAdy/src/structs.jl:646
  [4] read(::StructTypes.UnorderedStruct, buf::Base.CodeUnits{…}, pos::Int64, len::Int64, b::UInt8, ::Type{…})
    @ JSON3 ~/.julia/packages/JSON3/jSAdy/src/structs.jl:567
  [5] (::JSON3.StructClosure{Base.CodeUnits{UInt8, String}, @NamedTuple{}})(i::Int64, nm::Symbol, TT::Type; kw::@Kwargs{})
    @ JSON3 ~/.julia/packages/JSON3/jSAdy/src/structs.jl:557
  [6] StructClosure
    @ ~/.julia/packages/JSON3/jSAdy/src/structs.jl:555 [inlined]
  [7] applyfield
    @ ~/.julia/packages/StructTypes/AK4aM/src/StructTypes.jl:872 [inlined]
  [8] read(::StructTypes.UnorderedStruct, buf::Base.CodeUnits{…}, pos::Int64, len::Int64, b::UInt8, ::Type{…}; kw::@Kwargs{})
    @ JSON3 ~/.julia/packages/JSON3/jSAdy/src/structs.jl:618
  [9] read(::StructTypes.UnorderedStruct, buf::Base.CodeUnits{…}, pos::Int64, len::Int64, b::UInt8, ::Type{…})
    @ JSON3 ~/.julia/packages/JSON3/jSAdy/src/structs.jl:567
 [10] #read#53
    @ ~/.julia/packages/JSON3/jSAdy/src/structs.jl:744 [inlined]
 [11] read
    @ ~/.julia/packages/JSON3/jSAdy/src/structs.jl:740 [inlined]
 [12] read(str::String, ::Type{DistributedFactorGraphs.GraphsDFGs.PackedGraphsDFG}; jsonlines::Bool, kw::@Kwargs{})
    @ JSON3 ~/.julia/packages/JSON3/jSAdy/src/structs.jl:41
 [13] read
    @ ~/.julia/packages/JSON3/jSAdy/src/structs.jl:33 [inlined]
 [14] loadDFG(file::String)
    @ DistributedFactorGraphs ~/.julia/dev/DistributedFactorGraphs/src/FileDFG/services/FileDFG.jl:247
 [15] top-level scope
    @ REPL[32]:1
Some type information was truncated. Use `show(err)` to see complete types.
@dehann dehann added this to the v0.0.x milestone Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants