hbmartin / graphviz2drawio

Convert graphviz (dot) files into draw.io / lucid (mxGraph) format
http://graphviz2drawio.rtfd.io
GNU General Public License v3.0
165 stars 33 forks source link

no fill in text attributes #2

Closed jcaplan closed 5 years ago

jcaplan commented 5 years ago
This is alpha software, please report issues to:
https://github.com/hbmartin/graphviz2drawio/issues
Something went wrong, please report
Traceback (most recent call last):
  File "/home/jcaplan/.local/bin/graphviz2drawio", line 11, in <module>
    sys.exit(main())
  File "/home/jcaplan/.local/lib/python3.5/site-packages/graphviz2drawio/__main__.py", line 23, in main
    output = convert(args.to_convert, args.program)
  File "/home/jcaplan/.local/lib/python3.5/site-packages/graphviz2drawio/graphviz2drawio.py", line 26, in convert
    nodes, edges = SVG.parse(svg_graph)
  File "/home/jcaplan/.local/lib/python3.5/site-packages/graphviz2drawio/models/SVG.py", line 20, in parse
    nodes[title] = node_factory.from_svg(g)
  File "/home/jcaplan/.local/lib/python3.5/site-packages/graphviz2drawio/mx/NodeFactory.py", line 47, in from_svg
    current_text = Text.from_svg(t)
  File "/home/jcaplan/.local/lib/python3.5/site-packages/graphviz2drawio/mx/Text.py", line 35, in from_svg
    color=t.attrib["fill"],
KeyError: 'fill'
Sentry is attempting to send 2 pending error messages
Waiting up to 10 seconds
Press Ctrl-C to quit
jcaplan commented 5 years ago

Notsure where things go wrong but here's the full dot file:

digraph implications {
concentrate=true;
splines=polyline;
rankdir=LR;
subgraph {
c101 [shape=box,fontsize=11,label="abcd"];
c201 [shape=box,fontsize=11,label="abcd"];
c301 [shape=box,fontsize=11,label="abcd"];
e1001 [shape=egg,fontcolor=blue,color=blue,fontsize=11,label="abcd"];
c302 [shape=box,fontsize=11,label="abcd"];
e1002 [shape=egg,fontcolor=blue,color=blue,fontsize=11,label="abcd"];
c202 [shape=box,fontsize=11,label="abcd"];
c303 [shape=box,fontsize=11,label="abcd"];
e1003 [shape=egg,fontcolor=blue,color=blue,fontsize=11,label="abcd"];
e1004 [shape=egg,fontcolor=blue,color=blue,fontsize=11,label="abcd"];
e1005 [shape=egg,fontcolor=blue,color=blue,fontsize=11,label="abcd"];
e1006 [shape=egg,fontcolor=blue,color=blue,fontsize=11,label="abcd"];
e1007 [shape=egg,fontcolor=blue,color=blue,fontsize=11,label="abcd"];
e1008 [shape=egg,fontcolor=blue,color=blue,fontsize=11,label="abcd"];
e1009 [shape=egg,fontcolor=blue,color=blue,fontsize=11,label="abcd"];
r101 [shape=octagon,fontcolor=red,color=red,fontsize=11,label="abcd"];
e1010 [shape=egg,fontcolor=blue,color=blue,fontsize=11,label="abcd"];
r102 [shape=octagon,fontcolor=red,color=red,fontsize=11,label="abcd"];
r103 [shape=octagon,fontcolor=red,color=red,fontsize=11,label="abcd"];
r104 [shape=octagon,fontcolor=red,color=red,fontsize=11,label="abcd"];
r105 [shape=octagon,fontcolor=red,color=red,fontsize=11,label="abcd"];
c203 [shape=box,fontsize=11,label="abcd"];
c304 [shape=box,fontsize=11,label="abcd"];
e1011 [shape=egg,fontcolor=blue,color=blue,fontsize=11,label="abcd"];
r106 [shape=octagon,fontcolor=red,color=red,fontsize=11,label="abcd"];
c204 [shape=box,fontsize=11,label="abcd"];
c305 [shape=box,fontsize=11,label="abcd"];
e1012 [shape=egg,fontcolor=blue,color=blue,fontsize=11,label="abcd"];
e1013 [shape=egg,fontcolor=blue,color=blue,fontsize=11,label="abcd"];
r107 [shape=octagon,fontcolor=red,color=red,fontsize=11,label="abcd"];
c205 [shape=box,fontsize=11,label="abcd"];
c306 [shape=box,fontsize=11,label="abcd"];
e1014 [shape=egg,fontcolor=blue,color=blue,fontsize=11,label="abcd"];
e1015 [shape=egg,fontcolor=blue,color=blue,fontsize=11,label="abcd"];
e1016 [shape=egg,fontcolor=blue,color=blue,fontsize=11,label="abcd"];
r108 [shape=octagon,fontcolor=red,color=red,fontsize=11,label="abcd"];
c206 [shape=box,fontsize=11,label="abcd"];
c307 [shape=box,fontsize=11,label="abcd"];
e1017 [shape=egg,fontcolor=blue,color=blue,fontsize=11,label="abcd"];
r109 [shape=octagon,fontcolor=red,color=red,fontsize=11,label="abcd"];
c207 [shape=box,fontsize=11,label="abcd"];
c308 [shape=box,fontsize=11,label="abcd"];
e1018 [shape=egg,fontcolor=blue,color=blue,fontsize=11,label="abcd"];
c208 [shape=box,fontsize=11,label="abcd"];
c309 [shape=box,fontsize=11,label="abcd"];
e1019 [shape=egg,fontcolor=blue,color=blue,fontsize=11,label="abcd"];
r110 [shape=octagon,fontcolor=red,color=red,fontsize=11,label="abcd"];
c210 [shape=box,fontsize=11,label="abcd"];
c310 [shape=box,fontsize=11,label="abcd"];
e1020 [shape=egg,fontcolor=blue,color=blue,fontsize=11,label="abcd"];
e1021 [shape=egg,fontcolor=blue,color=blue,fontsize=11,label="abcd"];
r111 [shape=octagon,fontcolor=red,color=red,fontsize=11,label="abcd"];
c101 -> c201 [weight=10 op=br];
c201 -> c301 [weight=10 op=br];
c301 -> e1001 [weight=10 op=br];
c201 -> c302 [weight=10 op=br];
c302 -> e1002 [weight=10 op=br];
c101 -> c202 [weight=10 op=br];
c202 -> c303 [weight=10 op=br];
c303 -> e1003 [weight=10 op=br];
c303 -> e1004 [weight=10 op=br];
c303 -> e1005 [weight=10 op=br];
c303 -> e1006 [weight=10 op=br];
c303 -> e1007 [weight=10 op=br];
c303 -> e1008 [weight=10 op=br];
c303 -> e1009 [weight=10 op=br];
c202 -> r101 [weight=10 op=br];
r101 -> e1010 [weight=10 op=br];
c202 -> r102 [weight=10 op=br];
c202 -> r103 [weight=10 op=br];
c202 -> r104 [weight=10 op=br];
c202 -> r105 [weight=10 op=br];
c101 -> c203 [weight=10 op=br];
c203 -> c304 [weight=10 op=br];
c304 -> e1011 [weight=10 op=br];
c203 -> r106 [weight=10 op=br];
c101 -> c204 [weight=10 op=br];
c204 -> c305 [weight=10 op=br];
c305 -> e1012 [weight=10 op=br];
c305 -> e1013 [weight=10 op=br];
c204 -> r107 [weight=10 op=br];
c101 -> c205 [weight=10 op=br];
c205 -> c306 [weight=10 op=br];
c306 -> e1014 [weight=10 op=br];
c306 -> e1015 [weight=10 op=br];
c306 -> e1016 [weight=10 op=br];
c205 -> r108 [weight=10 op=br];
c101 -> c206 [weight=10 op=br];
c206 -> c307 [weight=10 op=br];
c307 -> e1017 [weight=10 op=br];
c206 -> r109 [weight=10 op=br];
c101 -> c207 [weight=10 op=br];
c207 -> c308 [weight=10 op=br];
c308 -> e1018 [weight=10 op=br];
c101 -> c208 [weight=10 op=br];
c208 -> c309 [weight=10 op=br];
c309 -> e1019 [weight=10 op=br];
c208 -> r110 [weight=10 op=br];
c101 -> c210 [weight=10 op=br];
c210 -> c310 [weight=10 op=br];
c310 -> e1020 [weight=10 op=br];
c310 -> e1021 [weight=10 op=br];
c210 -> r111 [weight=10 op=br];
{rank = same; c101;}
{rank = same; c201; c202; c203; c204; c205; c206; c207; c208; c210;}
c201 -> c202 [style=invis];
c202 -> c203 [style=invis];
c203 -> c204 [style=invis];
c204 -> c205 [style=invis];
c205 -> c206 [style=invis];
c206 -> c207 [style=invis];
c207 -> c208 [style=invis];
c208 -> c210 [style=invis];
{rank = same; c301; c302; c303; r101; r102; r103; r104; r105; c304; r106; c305; r107; c306; r108; c307; r109; c308; c309; r110; c310; r111;}
c301 -> c302 [style=invis];
c302 -> c303 [style=invis];
c303 -> r101 [style=invis];
r101 -> r102 [style=invis];
r102 -> r103 [style=invis];
r103 -> r104 [style=invis];
r104 -> r105 [style=invis];
r105 -> c304 [style=invis];
c304 -> r106 [style=invis];
r106 -> c305 [style=invis];
c305 -> r107 [style=invis];
r107 -> c306 [style=invis];
c306 -> r108 [style=invis];
r108 -> c307 [style=invis];
c307 -> r109 [style=invis];
r109 -> c308 [style=invis];
c308 -> c309 [style=invis];
c309 -> r110 [style=invis];
r110 -> c310 [style=invis];
c310 -> r111 [style=invis];
{rank = same; e1001; e1002; e1003; e1004; e1005; e1006; e1007; e1008; e1009; e1010; e1011; e1012; e1013; e1014; e1015; e1016; e1017; e1018; e1019; e1020; e1021;}
e1001 -> e1002 [style=invis];
e1002 -> e1003 [style=invis];
e1003 -> e1004 [style=invis];
e1004 -> e1005 [style=invis];
e1005 -> e1006 [style=invis];
e1006 -> e1007 [style=invis];
e1007 -> e1008 [style=invis];
e1008 -> e1009 [style=invis];
e1009 -> e1010 [style=invis];
e1010 -> e1011 [style=invis];
e1011 -> e1012 [style=invis];
e1012 -> e1013 [style=invis];
e1013 -> e1014 [style=invis];
e1014 -> e1015 [style=invis];
e1015 -> e1016 [style=invis];
e1016 -> e1017 [style=invis];
e1017 -> e1018 [style=invis];
e1018 -> e1019 [style=invis];
e1019 -> e1020 [style=invis];
e1020 -> e1021 [style=invis];
}
}
hbmartin commented 5 years ago

@jcaplan fixed in https://github.com/hbmartin/graphviz2drawio/commit/13490c60c3e4c87cc08f9238c7e8f12237b4ff75