Orange Forum • View topic - question about orngTree.printDot

question about orngTree.printDot

Report bugs (or imagined bugs).
(Archived/read-only, please use our ticketing system for reporting bugs and their discussion.)
Forum rules
Archived/read-only, please use our ticketing system for reporting bugs and their discussion.

question about orngTree.printDot

Postby vim » Sat May 27, 2006 5:36

Example Script tree.py
for Classification Tree(http://www.ailab.si/orange/doc/ofb/c_otherclass.htm):
when I uncomment the last line of tree.py(orngTree.printDot)
the script returns a error...
I use the Latest snapshot for MS Windows
the orngTree.py looks...., a little of trouble?
the link AT&T's Graphviz is breaked,maybe http://graphviz.org/.
best regards.
-----------------------------------------------
E:\python\oran\tree.py
17 print
18 orngTree.printTxt(tree)
---> 19 orngTree.printDot(tree, fileName='tree.dot', internalNodeShape="ellipse", leafShape="box")
20
21

C:\Python23\lib\site-packages\orange\orngTree.py in dotTree(tree, fileName, leafStr, nodeStr, leafShape, nodeShape, **argkw)
576 argkw.get("minExamples", 0), argkw.get("maxDepth", 1e10), argkw.get("simpleFirst", True),
577 tree,
--> 578 leafShape = leafShape, nodeShape = nodeShape, fle = fle).dotTree()
579
580 fle.write("}\n")

C:\Python23\lib\site-packages\orange\orngTree.py in dotTree(self, internalName)
552
553 def dotTree(self, internalName="n"):
--> 554 fle.write("digraph G {\n")
555 dotTree0(fle, tree.tree, None, tree, internalName)
556 fle.write("}\n")

NameError: global name 'fle' is not defined
WARNING: Failure executing file: <tree.py>

In [3]:

Postby Janez » Tue May 30, 2006 12:28

Fixed. Thanks.


Return to Bugs



cron