Orange Forum • View topic - Cannot get Orange to run on Windows XP on specific computer

Cannot get Orange to run on Windows XP on specific computer

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.

Cannot get Orange to run on Windows XP on specific computer

Postby vnams » Mon Jul 09, 2007 16:13

This is likely some very simple answer. I installed Orange on one computer (Windows XP) and it worked OK. I installed it on another computer, but it doesn't run. I click on the Orange Canvas icon, it flashes, shows the timer icon for about a second, and then nothing. I checked the processes list in the Windows Task Manager but don't see either Python running. I uninstalled Orange and Python, rebooted and installed. Still doesn't work. Any suggestions on things to try?

Postby marko » Tue Jul 10, 2007 9:21

Just a quick check: did this happen when installing a stable version of Orange? To install a snapshot, you must install a stable version before installing a snapshot.

Marko

Postby Janez » Tue Jul 10, 2007 10:58

Marko, why?

The snapshot should work for those who already have Python, qt, pyqt..., shouldn't it?

Postby marko » Tue Jul 10, 2007 11:35

Sorry.

What I ment to say is that need to install a stable version when you install orange on that computer for the first time, unless you are really really sure you already have all dependencies. Afterwards you can ofcourse apply snapshots at will.

Postby vnams » Tue Jul 10, 2007 12:17

Yes, I installed everything. And to test it, I uninstalled everything (including Python), and re-installed the base version only. Even that didn't work. But Python does work, including running Orange scripts in Python.
Vilis

Postby Gregor Leban » Tue Jul 10, 2007 12:46

Hi,

it is likely that Orange didn't find some modules that it needs. Here is a simple solution to find out where is the problem:

Go to the python_folder\lib\site-packages\Orange\OrangeCanvas folder (where python_folder is the folder where you have your python installed). There you will find a file orngCanvas.pyw. Rename it to orngCanvas.py and run it from command line with "python.exe orngCanvas.py". This will print out in the command line the exception which should explain why canvas wouldn't start. If the exception would be something strange, please post it here, so that we will find a solution for it.

Best regards,
Gregor

Postby vnams » Wed Jul 11, 2007 12:40

I ran that and got the following error message:

Traceback (most recent call last):
File "orngCanvas.py", line 7, in <module>
import orngTabs, orngDoc, orngDlgs, orngOutput, orngRegistry
File "C:\Python25\Lib\site-packages\orange\OrangeCanvas\orngRegistry.py", line 256, in <module>
directoryNames = __getDirectoryNames()
File "C:\Python25\Lib\site-packages\orange\OrangeCanvas\orngRegistry.py", line 237, in __getDirectoryNames
WidgetsToXML().ParseWidgetRoot(widgetDir, outputDir)
File "C:\Python25\Lib\site-packages\orange\OrangeCanvas\orngRegistry.py", line 41, in ParseWidgetRoot
file = open(os.path.join(outputDir, "widgetregistry.xml"), "wt")
IOError: [Errno 2] No such file or directory: 'C:\\Python25\\Lib\\site-packages\
\orange\\OrangeCanvas\\EARTH\\DATA:USERS\\VNAMS\\Application Data\\Orange\\OrangeCanvas\\widgetregistry.xml'

THanks, Vilis

Postby Gregor Leban » Wed Jul 11, 2007 16:33

Hi,

based on your output I would guess that you have a strange setting for your home variable. Orange takes user.home variable (which is usually C:\\Python25\\Lib\\site-packages) and appends to it "Orange\OrangeCanvas".

I don't know why, but in your case the final path is C:\\Python25\\Lib\\site-packages\
\orange\\OrangeCanvas\\EARTH\\DATA:USERS\\VNAMS\\Application Data\\Orange\\OrangeCanvas

If you would like to fix this on your machine, you can simply open the orngRegistry.py file in the OrangeCanvas folder and write

outputDir = "C:\\Python25\\Lib\\site-packages\\orange\\OrangeCanvas"

in line 234.

I hope this helps. This will of course work only on this computer where you have python installed in the default path (C:\python25\...)

Gregor

Postby Janez » Wed Jul 11, 2007 17:36

Gregor, since when is user.home c:\python25\lib\site-packages? This must be new, I always thought it was something like c:\Documents and Settings\<username>. :)

By the way, if you run canvas from command line using python.exe, you don't have to rename the orngCanvas from pyw to py.

Postby Gregor Leban » Thu Jul 12, 2007 9:22

Hi,

yes, user.home is usually what you wrote, but in your case it obviously contains some strange path (EARTH\\DATA:USERS\\VNAMS\\Application Data\\Orange\\OrangeCanvas) and as a result python throws an exception. This is why I suggested using the OrangeCanvas folder, where we used to save widget registry file, but we recently changed it to some subfolder inside user.home, mostly because of the linux users, which are not allowed to write inside OrangeCanvas folder.

You are right about renaming. The thing is that pyw files are opened using pythonw, which doesn't open a command line window. But since in your case you started canvas using python (and not pythonw) from command line you didn't have to rename the orngCanvas.pyw file.

Postby Gregor Leban » Thu Jul 12, 2007 9:31

This is what happens if you don't read who writes a reply. If I'd known it was you, Janez, I wouldn't bother replying :)

Postby vnams » Thu Jul 12, 2007 13:16

It worked! Thanks, Vilis


Return to Bugs



cron