Orange Forum • View topic - orange chokes on certain saved schema files

orange chokes on certain saved schema files

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.

orange chokes on certain saved schema files

Postby sesam » Wed Apr 20, 2005 15:39

Orange chokes on loading a saved Schema file, if one widget has been extended with more settings since the schema-file was saved.

I made a simple widget without persistent settings, built up a schema and saved it to file. After adding a setting to my widget, orange can no longer load this schema.

[code]Unhandled exception of type exceptions.EOFError occured at 16:17:13:
Traceback:
File: orngCanvas.pyw in line 305
Function name: menuItemOpen
Code: win.loadDocument(str(name))
File: orngDoc.py in line 480
Function name: loadDocument
Code:
tempWidget.instance.loadSettingsStr(settingsList[tempWidget.caption])
File: OWBaseWidget.py in line 176
Function name: loadSettingsStr
Code: settings = cPickle.loads(str)
Exception type: exceptions.EOFError
Exception value:
[/code]

Opening orange directly with this file (appending the schema-file on the command line in my orange shortcut) made orange crash and exit. I had to check the logfile (orange\OrangeCanvas\outputLog.htm) to find the error.
By opening orange as usual (i.e. nothing extra on the command line) I could then open the broken Schema-file, modify a bit and save it again. This time it works again.
I tried to repeat for this bug report, and it seems that also the connections between widgets are lost from this crash caused by a widget that got new settings.

Postby Gregor Leban » Thu Apr 21, 2005 8:36

Hi,

thanks for your bug report. It was a bug that happened only when you would change a widget from having no settings to having some settings. I already submitted the fixed OWBaseWidget.py to cvs. If for some reason you don't update orange from cvs, you can easily fix the file yourself. You just have to change the line

if str == None: return

into:

if str == None or str == "": return

in function loadSettingsStr.

This unhandled exception also caused the canvas to stop loading the rest of the schema, which is why there were no connections between the widgets.


Return to Bugs