Skip to content

MetaGraph to DOT seems buggy #73

Description

@tecosaur

MWE

julia> using MetaGraphsNext # v0.6.0

julia> struct Foo end

julia> g2 = MetaGraph(DiGraph(), label_type=Int, vertex_data_type=Foo)
Meta graph based on a SimpleDiGraph{Int64} with vertex labels of type Int64, vertex metadata of type Foo, edge metadata of type Nothing, graph metadata given by nothing, and default weight 1.0

julia> savegraph("data.dot", g2, DOTFormat())
ERROR: MethodError: no method matching length(::Foo)

Closest candidates are:
  length(::LibGit2.GitStatus)
   @ LibGit2 ~/.julia/juliaup/julia-1.10.0-rc1+0.x64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/status.jl:21
  length(::Tables.DictRowTable)
   @ Tables ~/.julia/packages/Tables/NSGZI/src/dicts.jl:118
  length(::Base.MethodSpecializations)
   @ Base reflection.jl:1164
  ...

Stacktrace:
 [1] show_meta_list(io::IOStream, meta::Foo)
   @ MetaGraphsNext ~/.julia/packages/MetaGraphsNext/YvA1m/src/persistence.jl:31
 [2] savedot(io::IOStream, meta_graph::MetaGraph{…})
   @ MetaGraphsNext ~/.julia/packages/MetaGraphsNext/YvA1m/src/persistence.jl:76
 [3] #32
   @ ~/.julia/packages/MetaGraphsNext/YvA1m/src/persistence.jl:100 [inlined]
 [4] open(::MetaGraphsNext.var"#32#33"{MetaGraph{}}, ::String, ::Vararg{String}; kwargs::@Kwargs{})
   @ Base ./io.jl:396
 [5] open
   @ Base ./io.jl:393 [inlined]
 [6] savegraph(file::String, meta_graph::MetaGraph{…}, ::DOTFormat)
   @ MetaGraphsNext ~/.julia/packages/MetaGraphsNext/YvA1m/src/persistence.jl:99
 [7] top-level scope
   @ REPL[13]:1
Some type information was truncated. Use `show(err)` to see complete types.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions