pombreda / pydot

Automatically exported from code.google.com/p/pydot
MIT License
0 stars 0 forks source link

Problem with empty labels #63

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Define node with an empty label:
node = Node('PROCESS_END', shape='doublecircle', style='filled', label='', 
width='.15')

What is the expected output? 
PROCESS_END [width=".15", style=filled, shape=doublecircle, label=""];
or better:
PROCESS_END [width=".15", style="filled", shape="doublecircle", label=""];

What do you see instead?
1. I get:
PROCESS_END [width=".15", style=filled, shape=doublecircle, label=];
2. and the the exception while generating png output:
Error: XXX.gv:17: syntax error near line 17
context: PROCESS_END [width=".15", style=filled, shape=doublecircle, >>>  
label=] <<< ;
3. and the result picture without the requested width of .15, and with a 
PROCESS_END label .

What version of the product are you using? On what operating system?
The case is with 1.0.28 release. 

Please provide any additional information below.
Release 1.0.25 manages this case properly.

IMO all the attribute values should be quoted. 

Original issue reported on code.google.com by rganow...@metoda.com.pl on 10 Jan 2012 at 9:19

GoogleCodeExporter commented 9 years ago
I see where that might be coming from. Although some attributes are handled 
better without quotes, I do see the problem with not having quotes for the 
empty label ;)
Will look into it.

Original comment by ero.carr...@gmail.com on 10 Jan 2012 at 10:42

GoogleCodeExporter commented 9 years ago
We have this problem also with Theano. Did a fix was found?

Original comment by frederic...@gmail.com on 14 Jun 2013 at 6:05

GoogleCodeExporter commented 9 years ago
I just found a work around. The problem is that I create Edge with the 
parameter label=''

If I create the Edge with the parameter label=None, it work.

This is a regression in pydot, but at least I have a work around. I can update 
my code to work with version 1.0.28.

Original comment by frederic...@gmail.com on 24 Oct 2014 at 4:20