pydot / pydot-ng

Python interface to Graphviz's Dot language compatible with Python 2 nad Python 3
MIT License
23 stars 10 forks source link

[63] Problem with empty labels #6

Open prmtl opened 9 years ago

prmtl commented 9 years ago

Reported by rganow...@metoda.com.pl, 2012-01-10T10:19:15Z

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. Originally assigned to ero.carr...@gmail.com From: https://code.google.com/p/pydot/issues/detail?id=63

prmtl commented 9 years ago

Comment 1: ero.carr...@gmail.com, Jan 10, 2012 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.

prmtl commented 9 years ago

Comment 2: frederic...@gmail.com, Jun 14, 2013 We have this problem also with Theano. Did a fix was found?