PyGTK and Py2Exe troubles

  • Thread starter Tim N. van der Leeuw
  • Start date
T

Tim N. van der Leeuw

I tried to create a windows executable of a pygtk program. My first
attempt worked, kinda, except that no themes were applied and no
readable fonts were found by pango; so all letters where just empty
squares. But the program worked.

I looked up some docs, found the following recipe on the PyGTK Wiki
site:
http://starship.python.net/crew/theller/moin.cgi/Py2exeAndPyGTK

I followed those instructions to convert my setup.py file; everything
still worked the same as before.

Then I copied GTK's 'etc', 'share' and 'lib' directories into the
directory of my executable, as per instructions.

That's when it all went wrong...

(See errors below)

Apart from the errors below, there were also multiple windows
error-reporting popup boxes telling me that the program crashed; do I
want to send info to Microsoft.

If anyone can help me getting a PyGTK GUI running as standalone
executable, that would be very much appreciated!

I know it's possible, BitTorrent had a PyGTK GUI on windows.

(I'm not that attached to PyGTK as such, but I'm somewhat familiar with
it and it has a good multi-column TreeView widget with inline editing.
That's what I need for my program, and wxPython didn't seem to have a
very workable solution for multicolumn treeviews...)


$ ./CBGui.exe

(CBGui.exe:1320): GLib-GObject-CRITICAL **: gtype.c:2215:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:1320): GLib-GObject-CRITICAL **: gtype.c:2255:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:1320): GLib-GObject-CRITICAL **: gtype.c:2215:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:1320): GLib-GObject-CRITICAL **: gtype.c:2255:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:1320): GLib-GObject-CRITICAL **: gtype.c:2215:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:1320): GLib-GObject-CRITICAL **: gtype.c:2215:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:1320): Gdk-CRITICAL **: gdk_window_new_internal: assertion
`GDK_IS_WINDOW (parent)' failed

(CBGui.exe:1320): GLib-GObject-CRITICAL **: g_object_new: assertion
`G_TYPE_IS_OBJECT (object_type)' failed

(CBGui.exe:1320): Gdk-CRITICAL **: _gdk_window_destroy_hierarchy:
assertion `window != NULL' failed

(CBGui.exe:1320): GLib-GObject-CRITICAL **: g_object_unref: assertion
`G_IS_OBJECT (object)' failed

(CBGui.exe:916): GLib-GObject-CRITICAL **: gtype.c:2215: initialization
assertion failed, use g_type_init() prior to this function

(CBGui.exe:916): GLib-GObject-CRITICAL **: gtype.c:2255: initialization
assertion failed, use g_type_init() prior to this function

(CBGui.exe:916): GLib-GObject-CRITICAL **: gtype.c:2215: initialization
assertion failed, use g_type_init() prior to this function

(CBGui.exe:916): GLib-GObject-CRITICAL **: gtype.c:2255: initialization
assertion failed, use g_type_init() prior to this function

(CBGui.exe:916): GLib-GObject-CRITICAL **: gtype.c:2215: initialization
assertion failed, use g_type_init() prior to this function

(CBGui.exe:916): GLib-GObject-CRITICAL **: gtype.c:2215: initialization
assertion failed, use g_type_init() prior to this function

(CBGui.exe:916): Gdk-CRITICAL **: gdk_window_new_internal: assertion
`GDK_IS_WINDOW (parent)' failed

(CBGui.exe:916): GLib-GObject-CRITICAL **: g_object_new: assertion
`G_TYPE_IS_OBJECT (object_type)' failed

(CBGui.exe:916): Gdk-CRITICAL **: _gdk_window_destroy_hierarchy:
assertion `window != NULL' failed

(CBGui.exe:916): GLib-GObject-CRITICAL **: g_object_unref: assertion
`G_IS_OBJECT (object)' failed

(CBGui.exe:5020): GLib-GObject-CRITICAL **: gtype.c:2215:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:5020): GLib-GObject-CRITICAL **: gtype.c:2255:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:5020): GLib-GObject-CRITICAL **: gtype.c:2215:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:5020): GLib-GObject-CRITICAL **: gtype.c:2255:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:5020): GLib-GObject-CRITICAL **: gtype.c:2215:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:5020): GLib-GObject-CRITICAL **: gtype.c:2215:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:5020): Gdk-CRITICAL **: gdk_window_new_internal: assertion
`GDK_IS_WINDOW (parent)' failed

(CBGui.exe:5020): GLib-GObject-CRITICAL **: g_object_new: assertion
`G_TYPE_IS_OBJECT (object_type)' failed

(CBGui.exe:5020): Gdk-CRITICAL **: _gdk_window_destroy_hierarchy:
assertion `window != NULL' failed

(CBGui.exe:5020): GLib-GObject-CRITICAL **: g_object_unref: assertion
`G_IS_OBJECT (object)' failed

(CBGui.exe:5936): GLib-GObject-CRITICAL **: gtype.c:2215:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:5936): GLib-GObject-CRITICAL **: gtype.c:2255:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:5936): GLib-GObject-CRITICAL **: gtype.c:2215:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:5936): GLib-GObject-CRITICAL **: gtype.c:2255:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:5936): GLib-GObject-CRITICAL **: gtype.c:2215:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:5936): GLib-GObject-CRITICAL **: gtype.c:2215:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:5936): Gdk-CRITICAL **: gdk_window_new_internal: assertion
`GDK_IS_WINDOW (parent)' failed

(CBGui.exe:5936): GLib-GObject-CRITICAL **: g_object_new: assertion
`G_TYPE_IS_OBJECT (object_type)' failed

(CBGui.exe:5936): Gdk-CRITICAL **: _gdk_window_destroy_hierarchy:
assertion `window != NULL' failed

(CBGui.exe:5936): GLib-GObject-CRITICAL **: g_object_unref: assertion
`G_IS_OBJECT (object)' failed

(CBGui.exe:4552): GLib-GObject-CRITICAL **: gtype.c:2215:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:4552): GLib-GObject-CRITICAL **: gtype.c:2255:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:4552): GLib-GObject-CRITICAL **: gtype.c:2215:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:4552): GLib-GObject-CRITICAL **: gtype.c:2255:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:4552): GLib-GObject-CRITICAL **: gtype.c:2215:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:4552): GLib-GObject-CRITICAL **: gtype.c:2215:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:4552): Gdk-CRITICAL **: gdk_window_new_internal: assertion
`GDK_IS_WINDOW (parent)' failed

(CBGui.exe:4552): GLib-GObject-CRITICAL **: g_object_new: assertion
`G_TYPE_IS_OBJECT (object_type)' failed

(CBGui.exe:4552): Gdk-CRITICAL **: _gdk_window_destroy_hierarchy:
assertion `window != NULL' failed

(CBGui.exe:4552): GLib-GObject-CRITICAL **: g_object_unref: assertion
`G_IS_OBJECT (object)' failed

(CBGui.exe:4428): GLib-GObject-CRITICAL **: gtype.c:2215:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:4428): GLib-GObject-CRITICAL **: gtype.c:2255:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:4428): GLib-GObject-CRITICAL **: gtype.c:2215:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:4428): GLib-GObject-CRITICAL **: gtype.c:2255:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:4428): GLib-GObject-CRITICAL **: gtype.c:2215:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:4428): GLib-GObject-CRITICAL **: gtype.c:2215:
initialization assertion failed, use g_type_init() prior to this
function

(CBGui.exe:4428): Gdk-CRITICAL **: gdk_window_new_internal: assertion
`GDK_IS_WINDOW (parent)' failed

(CBGui.exe:4428): GLib-GObject-CRITICAL **: g_object_new: assertion
`G_TYPE_IS_OBJECT (object_type)' failed

(CBGui.exe:4428): Gdk-CRITICAL **: _gdk_window_destroy_hierarchy:
assertion `window != NULL' failed

(CBGui.exe:4428): GLib-GObject-CRITICAL **: g_object_unref: assertion
`G_IS_OBJECT (object)' failed
 
R

riquito

Tim N. van der Leeuw ha scritto:
I tried to create a windows executable of a pygtk program. My first
attempt worked, kinda, except that no themes were applied and no
readable fonts were found by pango; so all letters where just empty
squares. But the program worked.

I looked up some docs, found the following recipe on the PyGTK Wiki
site:
http://starship.python.net/crew/theller/moin.cgi/Py2exeAndPyGTK

I followed those instructions to convert my setup.py file; everything
still worked the same as before.

versions of python,gtk,pygtk? wich windows?
wich installer of gtk have you used?
did you install pycairo too?

try again with these one, if different from yours
gtk -> http://gladewin32.sourceforge.net
pygtk/pycairo -> http://www.mapr.ucl.ac.be/~gustin/win32_ports/

bye,
Riccardo
 
T

Tim N. van der Leeuw

Tim N. van der Leeuw ha scritto:


versions of python,gtk,pygtk? wich windows?
wich installer of gtk have you used?
did you install pycairo too?

try again with these one, if different from yours
gtk -> http://gladewin32.sourceforge.net
pygtk/pycairo -> http://www.mapr.ucl.ac.be/~gustin/win32_ports/

bye,
Riccardo

Riccardo,

Thanks for your reply; sorry for omitting all the relevant details!

Python: 2.4.3 from python.org
Windows XP SP2
GTK 2.8.18 from gladewin32
pygtk & pycairo from Gustin's ports.
py2exe: 0.6.5

The program works when run under the interpreter; but crashes when
using py2exe and all shared files mentioned, are copied to the same dir
as the exe. (When I don't copy all those files, pango complains about
missing fonts and shows only empty squares for all leters. but the
program doesn't crash. It only crashes when GTK's shared files are with
the program)

Thanks,

--Tim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top