Orange Forum • View topic - No module named OWWidget

No module named OWWidget

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

No module named OWWidget

Postby Charoenchai » Sun Jul 08, 2012 16:05

Hi All,

I am very new with python and orange and have tried extend the widget by the http://orange.biolab.si/doc/extend-widgets/basics.htm and it work fine in the Orange.app.

However, I want to test script by running:
/Applications/Orange.app/Contents/MacOS/python OWDataSamplerA.py

and it said that:
Traceback (most recent call last):
File "OWDataSamplerA.py", line 7, in <module>
from OWWidget import *
ImportError: No module named OWWidget

So, what am I missing? any workaround for fix this issue?

Currently, I am using osx 10.7.4 and Orange.app which is orange-bundle-hg-0.0.10940.dmg

Thanks in advance,
Jo

Sorry for lagging in English language.

Re: No module named OWWidget

Postby Ales » Mon Jul 09, 2012 9:52

Try importing Orange before OWWidget
Code: Select all
import Orange
from OWWidget import *
import OWGUI
...

Re: No module named OWWidget

Postby Charoenchai » Mon Jul 09, 2012 10:29

Hi Ales,

Thank you very much.. such a small missing thing. :(


Return to Questions & Support



cron