Orange Forum • View topic - Dead end after loading "old" schema (.ows-file)

Dead end after loading "old" schema (.ows-file)

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.

Dead end after loading "old" schema (.ows-file)

Postby sesam » Thu Jul 07, 2005 11:22

Problem situation:
1. Build your own widget with one output signal.
2. Make a schema in orange canvas, connecting this output to any other widget and save the schema.
3. Change test widget and remove that signal.
4. Restart orange canvas and load schema (rebuilding orange registry first or not probably made no difference).
5. Now you can't close the orange canvas - you'll have to kill it's process manually. Trying close the canvas, or doing almost anything else with the schema just results in the below exception.

Output Window:
Code: Select all
Error. Widget Qt Debug Test Widget changed its output signals. It does not
have signal OutputData anymore.

orngDoc.addLink - Error. Unable to add link.


Unhandled exception of type exceptions.KeyError  occured at 12:02:52:
  File: in line 91
  Function name: removeActiveWidget
  Code: self.doc.removeWidget(item)
    File: in line 295
    Function name: removeWidget
    Code: while widget.outLines != []: self.removeLine1(widget.outLines[0])
      File: in line 218
      Function name: removeLine1
      Code: self.signalManager.removeLink(line.outWidget.instance,
line.inWidget.instance, outName, inName) # update SignalManager
        File: in line 212
        Function name: removeLink
        Code: for (widget, signalFrom, signalTo, enabled) in
        Exception type: exceptions.KeyError
        Exception value:

Example test widget
Code: Select all
<name>Debug Test Widget</name>
from OWWidget import *
class OW_TestSimon(OWWidget):
    def __init__(self,parent = None, signalManager = None):
        OWWidget.__init__(self, parent, signalManager, "Debug Test Widget")
        #self.outputs = [("OutputData", ExampleTable)]

<icon> parsing bug

Postby sesam » Thu Jul 07, 2005 11:50

While making the minimalist widget, I found that leaving out icon from the widget description gives problems when rebuilding the widget registry.
xml.dom.minidom gets data=None and tries data.replace
I don't think minidom could encode None and keep xml compatibility, so probably it's not supposed to get None-values at all.

This workaround in orange is in CVS now:
if icon == None: icon = "icon/Unknown.png"

Return to Bugs