pombreda / pydot

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

global name 'elm' is not defined, pydot.py in to_string, line 1458 #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Just tripped over this bug, i guess it should be edge instead of elm.
Otherwise working great, thanks a lot.

Original issue reported on code.google.com by mcallist...@gmail.com on 25 Mar 2008 at 3:46

GoogleCodeExporter commented 9 years ago
The exact error is:

Traceback (most recent call last):
  File "make_dot.0.py", line 81, in <module>
    dot.write(graph.to_string().encode('utf8'))
  File "build/bdist.linux-x86_64/egg/pydot.py", line 1458, in to_string
NameError: global name 'elm' is not defined

The patch to fix it should be:

--- pydot-1.0.2/pydot.py        2008-02-14 18:37:28.000000000 -0200
+++ pydot-1.0.2-nf/pydot.py     2008-03-25 14:16:46.000000000 -0300
@@ -1455,7 +1455,7 @@

                 edge = Edge(obj_dict=obj)

-                if self.obj_dict.get('simplify', False) and elm in edges_done:
+                if self.obj_dict.get('simplify', False) and edge in edges_done:
                     continue

                 graph.append( edge.to_string() + '\n' )

Original comment by narce...@gmail.com on 25 Mar 2008 at 5:20

GoogleCodeExporter commented 9 years ago
This is a nasty one making pydot unusable. Could someone make an update for 
this please?

Original comment by christia...@googlemail.com on 17 Apr 2008 at 8:34

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by ero.carr...@gmail.com on 30 Oct 2010 at 5:24

GoogleCodeExporter commented 9 years ago

Original comment by ero.carr...@gmail.com on 31 Oct 2010 at 12:20