Connecting Tech Pros Worldwide Forums | Help | Site Map

PyGTK and Py2Exe troubles

Tim N. van der Leeuw
Guest
 
Posts: n/a
#1: Jun 24 '06
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/thel...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


riquito@gmail.com
Guest
 
Posts: n/a
#2: Jun 24 '06

re: PyGTK and Py2Exe troubles



Tim N. van der Leeuw ha scritto:
[color=blue]
> 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/thel...Py2exeAndPyGTK
>
> I followed those instructions to convert my setup.py file; everything
> still worked the same as before.[/color]

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

Tim N. van der Leeuw
Guest
 
Posts: n/a
#3: Jun 24 '06

re: PyGTK and Py2Exe troubles



riqu...@gmail.com wrote:[color=blue]
> Tim N. van der Leeuw ha scritto:
>[color=green]
> > 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/thel...Py2exeAndPyGTK
> >
> > I followed those instructions to convert my setup.py file; everything
> > still worked the same as before.[/color]
>
> 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[/color]

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

Closed Thread