473,387 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

wxPython: help(wx) causes segfaulting?

Trying to get my feet wet with wxPython (moving from just
command-line apps), I tried the obvious (or, at least to me
was obvious):

Start python, "import wx" and then do a "help(wx)" to see
what it can tell me.

Unfortunately, it spewed back a handful of errors, gasped,
wheezed and died semi-hideously.

It's a stock install of Python 2.3.5 on Debian (testing).
The session has been pasted below if it's of any help. I
can successfully "dir(wx)" and get back all the goods.
However, the call to help() bombs out.

I'm having trouble figuring out what went wrong in the
matter: it looks like "g_object_new" is failing some
assertion test, but not knowing the internal workings of
CPython, I'm afraid this doesn't mean much to me. Any help
or suggestions would be appreciated.

If it makes a difference, other wxPython apps seem to run
just fine (particularly pyalacarte has no trouble).

Thanks,

-tkc
Python 2.3.5 (#2, Aug 30 2005, 15:50:26)
[GCC 4.0.2 20050821 (prerelease) (Debian 4.0.1-6)] on linux2
Type "help", "copyright", "credits" or "license" for more
information.
import wx
help(wx)


(process:11000): GLib-GObject-CRITICAL **: gtype.c:2254:
initialization assertion failed, use IA__g_type_init() prior
to this function

(process:11000): GLib-GObject-CRITICAL **: gtype.c:2254:
initialization assertion failed, use IA__g_type_init() prior
to this function

(process:11000): GLib-GObject-CRITICAL **: gtype.c:2254:
initialization assertion failed, use IA__g_type_init() prior
to this function

(process:11000): GLib-GObject-CRITICAL **:
g_type_add_interface_static: assertion
`G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(process:11000): GLib-GObject-CRITICAL **: gtype.c:2254:
initialization assertion failed, use IA__g_type_init() prior
to this function

(process:11000): GLib-GObject-CRITICAL **: gtype.c:2254:
initialization assertion failed, use IA__g_type_init() prior
to this function

(process:11000): GLib-GObject-CRITICAL **: gtype.c:2254:
initialization assertion failed, use IA__g_type_init() prior
to this function

(process:11000): GLib-GObject-CRITICAL **: g_object_new:
assertion `G_TYPE_IS_OBJECT (object_type)' failed
Segmentation fault


Feb 26 '06 #1
4 1651
On Sun, 26 Feb 2006 10:35:13 -0600, Tim Chase
<py*********@tim.thechases.com> wrote:
Trying to get my feet wet with wxPython (moving from just
command-line apps), I tried the obvious (or, at least to me
was obvious):

Start python, "import wx" and then do a "help(wx)" to see
what it can tell me.


I tried it on Windows Xp, and I got also a traceback:
help (wx)

Traceback (most recent call last):
File "<input>", line 1, in ?
File "C:\Python24\lib\site.py", line 328, in __call__
return pydoc.help(*args, **kwds)
File "C:\Python24\lib\pydoc.py", line 1640, in __call__
self.help(request)
File "C:\Python24\lib\pydoc.py", line 1684, in help
else: doc(request, 'Help on %s:')
File "C:\Python24\lib\pydoc.py", line 1468, in doc
pager(title % desc + '\n\n' + text.document(object, name))
File "C:\Python24\lib\pydoc.py", line 296, in document
if inspect.ismodule(object): return self.docmodule(*args)
File "C:\Python24\lib\pydoc.py", line 1070, in docmodule
contents.append(self.document(value, key, name))
File "C:\Python24\lib\pydoc.py", line 297, in document
if inspect.isclass(object): return self.docclass(*args)
File "C:\Python24\lib\pydoc.py", line 1194, in docclass
lambda t: t[1] == 'method')
File "C:\Python24\lib\pydoc.py", line 1144, in spill
name, mod, object))
File "C:\Python24\lib\pydoc.py", line 298, in document
if inspect.isroutine(object): return self.docroutine(*args)
File "C:\Python24\lib\pydoc.py", line 1255, in docroutine
doc = getdoc(object) or ''
File "C:\Python24\lib\pydoc.py", line 76, in getdoc
result = inspect.getdoc(object) or inspect.getcomments(object)
File "C:\Python24\lib\inspect.py", line 448, in getcomments
lines, lnum = findsource(object)
File "C:\Python24\lib\inspect.py", line 437, in findsource
if pat.match(lines[lnum]): break
IndexError: list index out of range

--
Franz Steinhaeusler
Feb 27 '06 #2

Franz Steinhaeusler wrote:
On Sun, 26 Feb 2006 10:35:13 -0600, Tim Chase
<py*********@tim.thechases.com> wrote:
Trying to get my feet wet with wxPython (moving from just
command-line apps), I tried the obvious (or, at least to me
was obvious):

Start python, "import wx" and then do a "help(wx)" to see
what it can tell me.


I tried it on Windows Xp, and I got also a traceback:
help (wx) Traceback (most recent call last):

[snip]

I don't seem to have any problem (except that it takes a while to load)

C:\Documents and Settings\André>python
ActivePython 2.4.2 Build 248 (ActiveState Corp.) based on
Python 2.4.2 (#67, Oct 30 2005, 16:11:18) [MSC v.1310 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
import wx
help(wx)

Help on package wx:

NAME
wx

FILE
c:\python24\lib\site-packages\wx-2.6-msw-unicode\wx\__init__.py

DESCRIPTION

#---------------------------------------------------------------------------
-
# Name: __init__.py
# Purpose: The presence of this file turns this directory into
a
# Python package.
#
# Author: Robin Dunn
#
# Created: 8-Aug-1998
# RCS-ID: $Id: __init__.py,v 1.11 2005/06/02 03:31:17 RD Exp
$
# Copyright: (c) 1998 by Total Control Software
# Licence: wxWindows license

#---------------------------------------------------------------------------
-

PACKAGE CONTENTS
__version__
_activex
_animate
_calendar
-- More --

However, please note that your (Original Poster) time would probably be
better invested by looking at the very comprehensive wxPython demo (it
may require a separate download).

André

Feb 27 '06 #3
On 27 Feb 2006 04:55:15 -0800, "André" <an***********@gmail.com> wrote:

Franz Steinhaeusler wrote:
On Sun, 26 Feb 2006 10:35:13 -0600, Tim Chase
<py*********@tim.thechases.com> wrote:
>Trying to get my feet wet with wxPython (moving from just
>command-line apps), I tried the obvious (or, at least to me
>was obvious):
>
>Start python, "import wx" and then do a "help(wx)" to see
>what it can tell me.


I tried it on Windows Xp, and I got also a traceback:
>>> help (wx)

Traceback (most recent call last):

[snip]

I don't seem to have any problem (except that it takes a while to load)

C:\Documents and Settings\André>python
ActivePython 2.4.2 Build 248 (ActiveState Corp.) based on
Python 2.4.2 (#67, Oct 30 2005, 16:11:18) [MSC v.1310 32 bit (Intel)]
on win32


C:\Python24\Lib\site-packages\wx-2.621-msw-ansi>python
ActivePython 2.4 Build 244 (ActiveState Corp.) based on
Python 2.4 (#60, Feb 9 2005, 19:03:27) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.

maybe you have 2.4.2 and I 2.4.
--
Franz Steinhaeusler
Feb 27 '06 #4
Franz Steinhaeusler wrote:
maybe you have 2.4.2 and I 2.4.


This looks like a wxPython problem, not a Python problem.
It might well be a version issue for you guys, but it's
more likely that a certain wxPython version is the culprit,
not a certain Python version.

Note however that the OP is using Linux, where the wxWidgets
uses completely different libraries, and that's where the
problem occurs. Besides, it's not a Python exception in the
Debian testing case, it's a segmentation fault in the
underlying GLib code that causes Python to crash.

BTW, Is the current Debian testing really equipped with
Python 2.3.5? It's a very sorry state of affairs if the
testing version of a major Linux release isn't using
Python 2.4, which was released in November 2004.

I can understand why people a leaving stock Debian for
Ubuntu...
Feb 28 '06 #5

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

Similar topics

1
by: Anand | last post by:
I am calling a python script from LabVIEW. This is achieved by making a dll call to python22.dll. It works perfectly well for most of my code. I now want to throwup dialog boxes from python. It...
6
by: Logan | last post by:
Would you recommend to use the wx package of wxPython? From the documentation: Provides a way to drop the wx prefix from wxPython objects by dynamically loading and renaming objects from the...
1
by: Harald Schneider | last post by:
Hi, I ran in some problems with Gordon's Installer, after upgrading to Python 2.3.2: After starting the executable it brings up a ImportError: No module named wxPython.wx Before upgrading,...
1
by: mdk.R | last post by:
Hello all: i'am installed wxPython 2.5 and Python2.3.4..i try execute script with wxPython but it show error: Traceback (most recent call last): File "E:\py\test.py", line 7, in ? import wx...
0
by: GuyBrush Treepwood | last post by:
I just compiled and installed wxWidgets and wxPython. When I want to test this libraries, I get: Python 2.4 (#1, Feb 19 2005, 19:24:31) on linux2 Type "help", "copyright", "credits" or...
0
by: Soren | last post by:
Hi, I'm trying to create a small GUI program where I can do plots using Matplotlib. I've been trying to borrow code from the examples at the matplotlib website, but I can't get it to work. I...
7
by: Terry Carroll | last post by:
I'm trying to use wx.ProgressBar, and the cancel button is not responding. Here is a simple program that exhibits the problem: ######################################################### import...
1
by: Massi | last post by:
Hi everyone! In my application (under windows) I'm using a wx.checklistbox. I would like the background color of an item to become red whenever an EVT_LISTBOX_DCLICK occurs. Is there any simple...
1
by: Steven W. Orr | last post by:
python-2.3.5 wx-2.6 I just bought the wxPython In Action book and I see that all the examples say to import wx All of our pre-existing code was horribly doing a from wxPython import * I...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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,...
0
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...

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.