Hi
I want to use some dot files generated for graphviz but I have some parsing
issues.
I am using HTML labels and it seems to cause problems.
Here is my example:
graph G {
"1" [label=<foo<br/>bar>,shape=box, ];
"2" [shape=box, ];
"1" -- "2" [fontcolor="#FF0000",
color="#FF0000", label="2.4e-04",
];
}
This HTML label ("label=<foo<br/>bar>") causes this error:
Traceback (most recent call last):
File "community_graph_tool.py", line 47, in <module>
main(sys.argv[1:])
File "community_graph_tool.py", line 30, in main
g = load_graph(idotfile)
File "/usr/lib/python2.7/dist-packages/graph_tool/__init__.py", line
1956, in load_graph
g.load(file_name, fmt, ignore_vp, ignore_ep, ignore_gp)
File "/usr/lib/python2.7/dist-packages/graph_tool/__init__.py", line
1712, in load
ignore_ep, ignore_gp)
RuntimeError: Wanted right bracket to end attribute list (token is
"<identifier> 'bar'")
If I remove <br/>, I get another error:
Traceback (most recent call last):
File "community_graph_tool.py", line 47, in <module>
main(sys.argv[1:])
File "community_graph_tool.py", line 30, in main
g = load_graph(idotfile)
File "/usr/lib/python2.7/dist-packages/graph_tool/__init__.py", line
1956, in load_graph
g.load(file_name, fmt, ignore_vp, ignore_ep, ignore_gp)
File "/usr/lib/python2.7/dist-packages/graph_tool/__init__.py", line
1712, in load
ignore_ep, ignore_gp)
RuntimeError: Unclosed HTML string (at end of input)
And if I completely remove the "label=<foo<br/>bar>,", it also removes all
errors.
Thanks for your work and time.
Johan