Problem Running Working Code on Mac

H

hg

goodepic said:
I'm newish to python and just got my first mac, so sorry if this is
stupid. I have a little app developed by someone else in wxGlade that
implements a complex stats package and language package, all in python.
It works fine on my work PC, but not on my laptop. I have a new
macbook 2ghz core duo, running os x 10.4.8 with python 2.5 installed (I
didn't erase the base 2.3, just put /usr/local/bin at the start of
$PATH), along with the latest wxPython, can't remember the version
number. I need to add a few more components from the stats package,
and I'd like eventually to pretty up the cheap GUI I was given, but
that'd be icing. When I try either python <filename> or pythonw
<filename>, I get this error:

WARNING:root:Could not import module "PyPar", defining sequential
interface
WARNING:root:No MySQLdb module available
WARNING:root:No pgdb module (PostgreSQL) available
Traceback (most recent call last):
File "febrlgui.py", line 513, in <module>
frame_1 = MyFrame(None, -1, "")
File "febrlgui.py", line 198, in __init__
self.__set_properties()
File "febrlgui.py", line 355, in __set_properties
self.a_box1.SetSelection(-1)
File
"//Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-ansi/wx/_core.py",
line 11487, in SetSelection
return _core_.ItemContainer_SetSelection(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "IsValid(n)" failed at
/BUILD/wxPython-src-2.8.0.1/src/mac/carbon/choice.cpp(242) in
GetString(): wxChoice::GetString(): invalid index

Of course I'm traveling soon and need to be able to work on this on my
macbook, so it's down to panic time. Any help is GREATLY appreciated.

Thanks,
Matt


I'd get rid of the warnings first by installing the correct librairies
(PyPar, MySQLDB, pgdb) .... who knows what the side effect are ?

hg
 
G

goodepic

I'm newish to python and just got my first mac, so sorry if this is
stupid. I have a little app developed by someone else in wxGlade that
implements a complex stats package and language package, all in python.
It works fine on my work PC, but not on my laptop. I have a new
macbook 2ghz core duo, running os x 10.4.8 with python 2.5 installed (I
didn't erase the base 2.3, just put /usr/local/bin at the start of
$PATH), along with the latest wxPython, can't remember the version
number. I need to add a few more components from the stats package,
and I'd like eventually to pretty up the cheap GUI I was given, but
that'd be icing. When I try either python <filename> or pythonw
<filename>, I get this error:

WARNING:root:Could not import module "PyPar", defining sequential
interface
WARNING:root:No MySQLdb module available
WARNING:root:No pgdb module (PostgreSQL) available
Traceback (most recent call last):
File "febrlgui.py", line 513, in <module>
frame_1 = MyFrame(None, -1, "")
File "febrlgui.py", line 198, in __init__
self.__set_properties()
File "febrlgui.py", line 355, in __set_properties
self.a_box1.SetSelection(-1)
File
"//Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-ansi/wx/_core.py",
line 11487, in SetSelection
return _core_.ItemContainer_SetSelection(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "IsValid(n)" failed at
/BUILD/wxPython-src-2.8.0.1/src/mac/carbon/choice.cpp(242) in
GetString(): wxChoice::GetString(): invalid index

Of course I'm traveling soon and need to be able to work on this on my
macbook, so it's down to panic time. Any help is GREATLY appreciated.

Thanks,
Matt
 
G

goodepic

Also, if it makes a difference, the lines quoted in the error message
were actually written automatically by wxGlade.
 
G

goodepic

I got rid of all the warnings but the pgdb one. I got postgresql and
pygresql installed, but the pgdb installed on the base python install
of python 2.3, and isn't found by my updated python 2.5 install, into
which I've successfully installed the other modules I needed.

Anyway, getting mysql and pypar didn't help, and I get those same three
exact warnings when I run the script successfully on my work PC. I'm
getting the same exact error quoted above still.

Any more ideas? I really appreciate any help here!!
 
G

goodepic

I got pgdb installed right, so I've got no more warnings. Otherwise
the output is exactly the same as quoted above!!
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top