Orange Forum • View topic - Importing some modules for Orange QT4 on Ubuntu?

Importing some modules for Orange QT4 on Ubuntu?

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.

Importing some modules for Orange QT4 on Ubuntu?

Postby jlara » Tue Feb 17, 2009 21:25

Hi,

Need help on solving issues with some of the modules and widgets.

System information : OS= Ubuntu8.10; Orange = revision 7142; Python = Python2.5; Installation steps= per instructions at download site for Orange QT4 on Ubuntu8.04

After attempting to build interaction graphs (Interaction graph module on Canvas) got the following error:
-------------------------------------------------------------------------------------------------
There were problems importing the following widgets:
OWItemsetViz: No module named qwt
OWSimon: the qt and PyQt4.QtCore modules both wrap the QObject class
OWCorrAnalysis: the qt module failed to register with the sip module
OWKMeans: No module named _orngCRS
The following widgets could not be imported and will not be available: OWItemsetViz, OWSimon, OWCorrAnalysis, OWKMeans
Unhandled exception of type IOError occured at 14:57:41:
Traceback:
File: OWBaseWidget.py, line 551 in processSignals
Code: handler(value)
File: OWInteractionGraph.py, line 211 in setData
Code: self.updateNewData(self.originalData)
File: OWInteractionGraph.py, line 248 in updateNewData
Code: textPng = pipePngIn.read()
IOError: [Errno 4] Interrupted system call
--------------------------------------------------------------------------------------------------
Thanks and best regards,

jlara

Postby Janez » Wed Feb 18, 2009 8:21

Hi,

most widgets you list are prototypes (OWSimon was programmed for some particular project etc.) or have not yet been upgraded to Qt4.0 (those that try to import qwt or qt). We'll have to look into OWKMeans, this one would have to work.

I have no idea why Interactions failed (you have graphviz installed?). We'll write that widget anew, anyway. If it is urgent, we can try doing it sooner - I don't think anyone works on it at the moment.

Importing some modules and widgets for Orange QT4 on Ubuntu

Postby jlara » Wed Feb 18, 2009 18:40

Hi,

Thanks for the response. In regard to interaction graphs, I have GraphViz (v2.18) and the interface to python2.5 (python-pygraphviz). GraphViz appears to be working fine since I use it for other GraphViz-dependent software programs like Banjo (for drawing Bayesian network structure graphs).

Indeed, I would appreciate if you could write a new widget to fix the problem. As to the urgency part, although inconvenient, I work on the Windows version for this particular task.
Please notify me when the new widget becomes available.

Thanks again,

jlara

Postby Janez » Thu Feb 19, 2009 19:32

Hi, again, for a very quick fix, open orange/OrangeWidgets/Unsupervised/OWInteractionGraph.py, locate the two lines containing 'popen2' and insert after them

import time
time.sleep(4)

(If you don't know Python: be careful to indent the lines the same as those above and below.)

I know this is ugly and that I should call some 'wait' function to wait for the graphviz to finish ... but it works. If not, try increasing 4 to something ridiculous, say 20.

Quick fix for Interaction graphs

Postby jlara » Thu Feb 19, 2009 20:42

Hello Janez,

Thank you very much. I'm very happy for the incredible support that the Orange team provides. Adding these lines made it work just fine. I know this is work in progress, so I would also like to point out that the save function (left or right canvas) seems not to be working properly. The following error output pops up:

Traceback:
File: orngSignalManager.py, line 61 in __call__
Code: self.method(*k)
File: OWInteractionGraph.py, line 554 in saveToFileLCanvas
Code: sizeDlg = OWDlgs.OWChooseImageSizeDlg(self.canvasL)
NameError: global name 'OWDlgs' is not defined
Unhandled exception of type NameError occured at 14:15:13:
Traceback:
File: orngSignalManager.py, line 61 in __call__
Code: self.method(*k)
File: OWInteractionGraph.py, line 554 in saveToFileLCanvas
Code: sizeDlg = OWDlgs.OWChooseImageSizeDlg(self.canvasL)
NameError: global name 'OWDlgs' is not defined

Best regards,

jlara

Postby Janez » Thu Feb 19, 2009 21:50

This one has already been fixed. Just change

import OWGUI

to

import OWGUI, OWDlgs

If you have Orange from the SVN, you can just update. I also added a better fix for the above problem.

Interaction Graphs

Postby jlara » Thu Feb 19, 2009 22:08

Hi,

The modification to the import command worked. I'll download the new version later tonight. Once again, thanks!!

Best regards,

James

Ineraction Graphs

Postby jlara » Fri Feb 20, 2009 4:04

Hi Janez,

Just wanted to inform you that I downloaded the most recent SVN (revision 7193) but still got the same error as previously described in my first report. Had to modify the OWInteractionGraph.py by adding the lines after popen2 as you instructed. The import OWGUI, OWDlgs is implemented.

Best regards,

jlara

Postby Janez » Fri Feb 20, 2009 8:42

Thanks, that's what I wanted to know. I could replicate your problem before, and adding time.sleep fixed it. But with the later changes - those which are now on SVN - I didn't need the sleep any more. So I wandered if you still needed it or not. OK, I'll have to find something else, time.sleep is too dirty.

Interaction Graphs

Postby jlara » Fri Feb 20, 2009 18:46

Thanks Janez. I would appreciate if you do this for me.

Note: the script lines from "# create a sorted list of total information" to "# do we want to show interactions between attrIndex1 and attrIndex2" in both SVN-7142 and 7193 (the one I downloaded last night) appears to be same. Is this where the later changes you tested were done?

Best regards,

jlara

Postby Blaz » Mon Feb 23, 2009 7:58

We are fixing OWKMeans by writing a new k-means agglomerative clustering. Now that this is done (see documentation for orngClustering), I need to change this widget. Due to vacation I'm out this week and I'll do this in the first days of March.[/url]


Return to Bugs