Orange Forum • View topic - Can't create widgets

Can't create widgets

A place to ask questions about methods in Orange and how they are used and other general support.

Can't create widgets

Postby bgbg » Thu Jun 18, 2009 8:14

Finally, several months after receiving an answer on this form (http://www.ailab.si/orange/forum/viewtopic.php?p=1885), I'm trying to create a widget outside Canvas. This is my test program:
Code: Select all
import sys
import orange, orngSVM, orngBayes, orngTest, orngStat
sys.path.append(r"c:\Python25\lib\site-packages\orange\OrangeWidgets\Evaluate")
from OWROC import *
data = orange.ExampleTable('data.tab')
b = orngBayes.BayesLearner()
b.name = 'bayes'
s = orngSVM.SVMLearner()
s.name = 'svm'
learners = [b, s]
results = orngTest.learnAndTestOnLearnData(learners, data)
a = QApplication(sys.argv)
ow = OWROC()
ow.show()
ow.test_results(results)
a.exec_loop()



And this is the output that I receive:



C:\temp>python test.py
Traceback (most recent call last):
File "test.py", line 17, in <module>
ow.test_results(results)
File "C:\Python25\Lib\site-packages\orange\OrangeWidgets\Evaluate\OWROC.py", line 1003, in test_results
self.calcAllClassGraphs()
File "C:\Python25\Lib\site-packages\orange\OrangeWidgets\Evaluate\OWROC.py", line 881, in calcAllClassGraphs
g.setShowConvexCurves(self.ShowConvexCurves)
File "C:\Python25\Lib\site-packages\orange\OrangeWidgets\Evaluate\OWROC.py", line 302, in setShowConvexCurves
self.updateCurveDisplay()
File "C:\Python25\Lib\site-packages\orange\OrangeWidgets\Evaluate\OWROC.py", line 270, in updateCurveDisplay
self.curve(self.classifierIterationCKeys[cNum][iNum]).setEnabled(b)
IndexError: list index out of range


What am I doing wrong?

Return to Questions & Support