Re: [Pythonmac-SIG] debugging bus error on launch [py2app]

2011-06-09 Thread Ronald Oussoren




On Jun 9, 2011, at 19:02, Jeffrey O'Neill  wrote:

> I figured out what was causing my bus error.  In my setup.py file, I have
> 
> setup(
> ...
> version = v,
> ...)
> 
> If v is a string or int then everything works fine.  If v is a list or tuple 
> then you get the bus error I reported.
> 
> Clearly my fault, but would be nice to get a better error message. :)  I 
> don't know if this would be done in setuptools or py2app.
> 
> Thanks everyone for your help.

Thank you for telling us the solution.  Py2app should have given an error 
message about an invalid version instead of stuffing it in the application 
bundle.

Ronald

> 
> Jeff
> 
> On Thu, Jun 9, 2011 at 7:10 PM, Jeffrey O'Neill  
> wrote:
> 
> On Tue, Jun 7, 2011 at 9:53 AM, Ronald Oussoren  
> wrote:
> 
> Another option to get more information, could you run:
> 
> $ DYLD_PRINT_LIBRARIES=1 /dist/OpenSTV.app/Contents/MacOS/OpenSTV
> 
> This will print the libraries that get loaded, and might provide insight in 
> what's going on.
> 
> Also: what GUI libraries do you use? Can you reproduce the issue in a smaller 
> program that you can share?  The latter would allow me to debug the issue on 
> my machine.
> 
> I set the environment var and this is what I get:
> 
> $ ./dist/OpenSTV.app/Contents/MacOS/OpenSTV 
> dyld: loaded: 
> /Users/joneill/OpenSTV/OpenSTV/./dist/OpenSTV.app/Contents/MacOS/OpenSTV
> dyld: loaded: /usr/lib/libSystem.B.dylib
> dyld: loaded: /usr/lib/system/libmathCommon.A.dylib
> dyld: loaded: 
> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
> dyld: loaded: /usr/lib/libauto.dylib
> dyld: loaded: /usr/lib/libicucore.A.dylib
> dyld: loaded: /usr/lib/libobjc.A.dylib
> dyld: loaded: /usr/lib/libz.1.dylib
> dyld: loaded: /usr/lib/libstdc++.6.dylib
> Bus error
>  
> This doesn't enlighten me, but perhaps it will give others an idea...
> 
> The only GUI library I use is WxPython.  I'll work on creating a smaller test 
> case for debugging purposes.
> 
> To respond to Chris's question, I delete build and dist in my setup.py using 
> this:
> 
> # Remove the build and dist folders
> shutil.rmtree("build", ignore_errors=True)
> shutil.rmtree("dist", ignore_errors=True)
> so that I never forget!
> 
> 
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] debugging bus error on launch [py2app]

2011-06-09 Thread Jeffrey O'Neill
I figured out what was causing my bus error.  In my setup.py file, I have

setup(
...
version = v,
...)

If v is a string or int then everything works fine.  If v is a list or tuple
then you get the bus error I reported.

Clearly my fault, but would be nice to get a better error message. :)  I
don't know if this would be done in setuptools or py2app.

Thanks everyone for your help.

Jeff

On Thu, Jun 9, 2011 at 7:10 PM, Jeffrey O'Neill wrote:

>
> On Tue, Jun 7, 2011 at 9:53 AM, Ronald Oussoren wrote:
>
>>
>> Another option to get more information, could you run:
>>
>> $ DYLD_PRINT_LIBRARIES=1 /dist/OpenSTV.app/Contents/MacOS/OpenSTV
>>
>> This will print the libraries that get loaded, and might provide insight
>> in what's going on.
>>
>> Also: what GUI libraries do you use? Can you reproduce the issue in a
>> smaller program that you can share?  The latter would allow me to debug the
>> issue on my machine.
>>
>
> I set the environment var and this is what I get:
>
> $ ./dist/OpenSTV.app/Contents/MacOS/OpenSTV
> dyld: loaded:
> /Users/joneill/OpenSTV/OpenSTV/./dist/OpenSTV.app/Contents/MacOS/OpenSTV
> dyld: loaded: /usr/lib/libSystem.B.dylib
> dyld: loaded: /usr/lib/system/libmathCommon.A.dylib
> dyld: loaded:
> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
> dyld: loaded: /usr/lib/libauto.dylib
> dyld: loaded: /usr/lib/libicucore.A.dylib
> dyld: loaded: /usr/lib/libobjc.A.dylib
> dyld: loaded: /usr/lib/libz.1.dylib
> dyld: loaded: /usr/lib/libstdc++.6.dylib
> Bus error
>
> This doesn't enlighten me, but perhaps it will give others an idea...
>
> The only GUI library I use is WxPython.  I'll work on creating a smaller
> test case for debugging purposes.
>
> To respond to Chris's question, I delete build and dist in my setup.py
> using this:
>
> # Remove the build and dist folders
> shutil.rmtree("build", ignore_errors=True)
> shutil.rmtree("dist", ignore_errors=True)
> so that I never forget!
>
>
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] debugging bus error on launch [py2app]

2011-06-09 Thread Jeffrey O'Neill
On Tue, Jun 7, 2011 at 9:53 AM, Ronald Oussoren wrote:

>
> Another option to get more information, could you run:
>
> $ DYLD_PRINT_LIBRARIES=1 /dist/OpenSTV.app/Contents/MacOS/OpenSTV
>
> This will print the libraries that get loaded, and might provide insight in
> what's going on.
>
> Also: what GUI libraries do you use? Can you reproduce the issue in a
> smaller program that you can share?  The latter would allow me to debug the
> issue on my machine.
>

I set the environment var and this is what I get:

$ ./dist/OpenSTV.app/Contents/MacOS/OpenSTV
dyld: loaded:
/Users/joneill/OpenSTV/OpenSTV/./dist/OpenSTV.app/Contents/MacOS/OpenSTV
dyld: loaded: /usr/lib/libSystem.B.dylib
dyld: loaded: /usr/lib/system/libmathCommon.A.dylib
dyld: loaded:
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
dyld: loaded: /usr/lib/libauto.dylib
dyld: loaded: /usr/lib/libicucore.A.dylib
dyld: loaded: /usr/lib/libobjc.A.dylib
dyld: loaded: /usr/lib/libz.1.dylib
dyld: loaded: /usr/lib/libstdc++.6.dylib
Bus error

This doesn't enlighten me, but perhaps it will give others an idea...

The only GUI library I use is WxPython.  I'll work on creating a smaller
test case for debugging purposes.

To respond to Chris's question, I delete build and dist in my setup.py using
this:
# Remove the build and dist folders
shutil.rmtree("build", ignore_errors=True)
shutil.rmtree("dist", ignore_errors=True)
so that I never forget!
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] Getting an Error When Running App built with Py2app

2011-06-09 Thread Christopher Barker

Mike wrote:

Hi,

I'm using the built in Python 2.6 that comes with OSX. Should I install 
Python from python.org? If so, which version?


That depends on your goals.

If you are happy with your app only running on 10.6 and above, then the 
built-in one should work.


If you want your app to run on OS-X versions 10.3.9 and above (or any 
version before 10.6) then you need to install a python.org version.


You can use either 2.6 or 2.7, but if you use 2.7, use the "32 bit, 
10.3" build -- the 32-64 bit 10.6 build will only run on 10.6


You may want to give that a try anyway, to see if it fixes your issue, 
but Ronald can't fix bugs or add tests if non one gives him broken 
examples -- so if you do want the build-in python, it would be great to 
keep trying an reporting what you find.


One other note -- wx installs itself outside of the Python Framework -- 
this way both the Apple and Python.org installs can use it. It uses some 
"*.pth" trickery to accomplish that -- that may be what's confusing py2app.


-Chris




Mike
- Original Message - From: "Chris Barker" 
To: "Mike" ; 
Sent: Wednesday, June 08, 2011 1:12 AM
Subject: Re: [Pythonmac-SIG] Getting an Error When Running App built 
with Py2app




On 6/7/11 7:38 PM, Mike wrote:

Hi,
I built my python program using Py2app, using the default setup.py
script. I'm running Mac OSX Snow Leopard 64 bit.


which python are you using? Py2app is really expected to work right 
with Apple's built-in python (it can't include python itself)



ImportError:
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/wx/_core_.so' 


not found


This looks like it's looking for wx in Apple's python.

I'd install the python from python.org, and try again with that. It's 
probably what you ultimately want anyway.


-Chris



--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov 





--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG