473,545 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PyGTK and Py2Exe troubles

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_OBJE CT (object_type)' failed

(CBGui.exe:1320 ): Gdk-CRITICAL **: _gdk_window_des troy_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_OBJE CT (object_type)' failed

(CBGui.exe:916) : Gdk-CRITICAL **: _gdk_window_des troy_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_OBJE CT (object_type)' failed

(CBGui.exe:5020 ): Gdk-CRITICAL **: _gdk_window_des troy_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_OBJE CT (object_type)' failed

(CBGui.exe:5936 ): Gdk-CRITICAL **: _gdk_window_des troy_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_OBJE CT (object_type)' failed

(CBGui.exe:4552 ): Gdk-CRITICAL **: _gdk_window_des troy_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_OBJE CT (object_type)' failed

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

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

Jun 24 '06 #1
2 2557

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/thel...Py2exeAndPyGTK

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


versions of python,gtk,pygt k? 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

Jun 24 '06 #2

riqu...@gmail.c om wrote:
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/thel...Py2exeAndPyGTK

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


versions of python,gtk,pygt k? 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

Jun 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3957
by: Brian Hlubocky | last post by:
I'm have a fairly simple (in terms of COM) python program that pulls info from an Access database and creates Outlook contacts from that information. It uses wxPython for gui and works without problems. I want to be able to distribute this program using py2exe, but I am having some problems. I am using a simple setup.py like in the...
1
2754
by: Olav | last post by:
I'm having a problem when I try to make a standalone installation of a Python program using Tim Goldens WMI-module. The py2exe produce the exe-file as expected, but it fails to execute. I have run makepy manually on one all of the above libraries. Microsoft WMI Scripting Library WMI ADSI Extension Type Library WMICntl Type Library
5
7913
by: Viktor | last post by:
Did anybody managed to "pack", a program that uses pygtk with pyexe? The best result I got was: Pango-ERROR **: file shape.c: line 75 (pango_shape): assertion faled: (glyphs->num_glyphs > 0) aborting... I'm using python2.4, pygtk-2.6.1-1.win32-py2.4, gtk-win32-2.6.4-rc1. Thanks in advance.
25
4259
by: TPJ | last post by:
GUI's etc: PyGtk on Windows "(...) So if someone develops mainly for X and just wants to make sure that it is not impossible to run on Windows, you can use PyGTK. (...)", July 2nd, 1999 pyGTK on Windows "(...) > can i use pyGTK under > Windows???
1
2307
by: brieuc.gorin | last post by:
I try to create an exe using py2exe, but i've got some troubles. In my application, i use a flash activex control with wxPython (wx.lib.activexwrapper). I get the following lines in the log when i run my executable Code: Traceback (most recent call last): File "main.py", line 8, in ? File "misc.pyc", line 10, in ? File "xmlconfig.pyc",...
2
1951
by: thomas carpentier | last post by:
Hello, I have created a program with a GUI ( glade). In this script I call the Python Imaging Library. I have developped this program onto linux, but il would like export it on Windows, however I have a problem with py2exe. If the new user has not python and library(PIL, GLADE) installed, it doesn't work. I don't know how integrate...
0
1393
by: He Jibo | last post by:
Hi, Everyone, Could someone help me how to install pygtk? I get some problems with it. Here is the error I get while install pygtk: https://netfiles.uiuc.edu/jibohe2/error.GIF?uniq=-k6678k I use python 2.4, I first installed glade-2.0.1-win32_with_gtk, and then pycairo-1.0.2-1.win32-py2.4, pygobject-2.12.3-1.win32-py2.4, and
0
1773
by: Michael Palmer | last post by:
On Sep 16, 12:30 pm, binaryjesus <coolman.gu...@gmail.comwrote: I haven't tried it myself, but I came across a blog post the other day that describes a way of building windows installers for pyGTK applications at http://unpythonic.blogspot.com/2007/07/pygtk-py2exe-and-inno-setup-for-single.html
0
1919
by: vishnu1986 | last post by:
Hi guys, I saw quite a few posts regarding this but I was unable to solve this problem that I am facing. First off, when I do the following in my setup.py, windows= } ], Python crashes and I am unable to run the script using python setup.py py2exe.
0
7484
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7415
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7675
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7928
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7440
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
4963
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3451
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1902
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1030
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.