Orange Forum • View topic - Orange won't start

Orange won't start

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 won't start

Postby aapp » Sat Jul 25, 2009 21:39

I have installed latest snapshot (full package) with no problems. Then I've tried to start Orange and got next error "The procedure entry point _Z10forcepointR11QTextStream could not be located in the dynamic link library QtCore4.dll". I've tried a lot of things to make it work with no success. Any help will be appreciated.

Postby Janez » Sun Jul 26, 2009 21:39

Just when I thought about telling you that this is gonna be difficult to replicate but I've heard it's related to MikTex ... voila, I discovered I have exactly the same problem on my newly configured PC.

I assume that you indeed have MikTex installed. MikTex installs its own QtCore4.dll which is incompatible with the one used in Python. Yet if Windows find the MikTex's QtCore4 before the Python's, it will attempt to load it and fail.

Edit the path environment variable and put C:\Python25\PyQt4\bin before C:\Program Files\MiKTeX 2.7\miktex\bin (these are the default directories, they may be different on your machine, of course).

Anybody knows a better solution?

I've googled for it and I've seen others ranting about this but nobody proposed anything better.

Postby john » Sat Aug 08, 2009 12:02

Thank you Janez, your fix works just fine..

Postby Guest » Thu Aug 27, 2009 22:14

Will this adversely affect miketex?

Postby Janez » Thu Aug 27, 2009 22:52

It doesn't seem to. MikTeX uses Qt in its Package manager. I just tried running it and it works. It seems that Orange's (that is, PyQt's) Qt is compatible with MikTeX.

Anyway, just today I added a workaround to Orange, so that it puts the PyQt's Qt before the MikTeX's - internally, without affecting the system. You can leave the path as it is and grab the tomorrow's snapshot, or just put

Code: Select all
import os
paths = os.environ["PATH"].split(";")
paths.sort(lambda x,y: -1 if "PyQt4" in x else (1 if "miktex" in y and os.path.exists(os.path.join(y, "QtCore4.dll")) else 0))
os.environ["PATH"] = ";".join(paths)

at the top of c:\python25\lib\site-packages\orange\OrangeCanvas\orngCanvas.pyw. (This is for Windows only! The actual fix is slightly different.)

This should also help if other applications bring their own Qt dlls, or if PyQt's Qt is in a non-standard location. If anybody knows of any other application which meddles with PyQt in a similar way, please tell us.

Return to Bugs