Executable created with py2exe freezes when using webkit's open(url) function

213 views Asked by At

I am using the GUI2Exe program to create my executable, and while I can build and start the executable, it crashed on a call to "open" the url. This is repeatable not only in my program but in the super simple 14 line webkit browser. And when using cx_freeze instead of py2exe.

The "problem signature" reported in the windows diagnose thing points it's finger at the libcairo-2.dll

Commenting out the browser.open(url) call results in the window opening (albeit without the contents that the browser would be loading) and responds to the close command.

gobject.threads_init()
window = gtk.Window()
browser = webkit.WebView()
#browser.open("http://www.google.com")
window.add(browser)
window.show_all()

Running from the command line (python myprogram.py) , my program runs normally on both Windows and Ubuntu. To formally state this as a question: how can I solve this problem and successfully create a functional "frozen" python executable?

1

There are 1 answers

0
elzilrac On

My best solution for this was to rewrite the program to use the qtwebkit library. Plays much nicer with py2exe.