473,606 Members | 2,115 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 2561

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
3964
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 documentation for the py2exe tool and everything compiles ok, except that when I run the exe, I get an...
1
2757
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
7915
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
4267
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
2312
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", line 10, in ?
2
1955
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 library into my setup.
0
1400
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
1778
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
1925
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
8010
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8429
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8084
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8300
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6761
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5963
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3922
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2443
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
0
1287
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.