From jeff.oneill at openstv.org Sat Jun 4 05:04:35 2011 From: jeff.oneill at openstv.org (Jeffrey O'Neill) Date: Fri, 3 Jun 2011 23:04:35 -0400 Subject: [Pythonmac-SIG] py2app issue #19: py2app 0.6 series does not copy 'data' resources into the app bundle Message-ID: I've used py2app for many years with great success. I'm now running into a problem and I suspect it is issue 19 that is causing the problem. My setup.py file includes data resources. From issue 19, it looks like this is broken with the 0.6.* series. What is the most recent version of py2app that does not have this bug? _________________________________________________________ OpenSTV -- Software for ranked-choice and preferential voting systems http://www.OpenSTV.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronaldoussoren at mac.com Sun Jun 5 15:18:55 2011 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Sun, 05 Jun 2011 06:18:55 -0700 Subject: [Pythonmac-SIG] py2app issue #19: py2app 0.6 series does not copy 'data' resources into the app bundle In-Reply-To: References: Message-ID: <04607480-CDE2-453F-BBBF-8F946B1DDAEE@mac.com> On 3 Jun, 2011, at 20:04, Jeffrey O'Neill wrote: > I've used py2app for many years with great success. I'm now running into a problem and I suspect it is issue 19 that is causing the problem. > > My setup.py file includes data resources. From issue 19, it looks like this is broken with the 0.6.* series. > > What is the most recent version of py2app that does not have this bug? Release 0.6.2 should no longer have this issue (and I seem to have forgotten to close the issue after doing that release). Could you test this release to see if the problem has really been fixed? Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From amorris at mistermorris.com Sun Jun 5 16:01:41 2011 From: amorris at mistermorris.com (Adam Morris) Date: Sun, 5 Jun 2011 21:01:41 +0700 Subject: [Pythonmac-SIG] Porting xattr to Python3; question linking to dynamic library Message-ID: Not sure if this is the best place to ask, but you guys have been helpful in the past: Apple's python has the xattr module built-in, but I'm writing an app that needs ("wants") Python 3. I wrote to the author asking if there was any plans to port xattr to Python 3, and he suggested that it would be easy enough to do if I were to give it a try. So I have, but I'm running into a problem when it links to the included dynamic library: 1) I've used 2to3 script to get the actual code to Python 3 2) I've installed Distribute, (xattr needs setuptools) 3) Ran python3 setup.py install and didn't get any warnings (yay) 4) Manually fixed simple relative import problem that 2to3 missed on files that setup.py installed, I assume because said file wasn't in build folder and so didn't detect a relative import 5) Getting ImportError: dlopen(/path/to/xattr/_xattr.so, 2): Symbol not found: _PyString_AS_STRING At this point I have a vague understanding of what the problem is. Python3 strings have changed to Unicode so I assume there's another symbol (constant?) that I have to use. If so, how do I go about getting an .so file to avoid getting that error? I'm additionally really confused by the problem and fix in 4 ... does this mean that setup.py wrote a file? Or is this how linking to dynamic libraries work? The problem is beyond my understanding of the environment that's going on here. Any help? -Adam From jeff.oneill at openstv.org Mon Jun 6 01:39:52 2011 From: jeff.oneill at openstv.org (Jeffrey O'Neill) Date: Sun, 5 Jun 2011 19:39:52 -0400 Subject: [Pythonmac-SIG] py2app issue #19: py2app 0.6 series does not copy 'data' resources into the app bundle In-Reply-To: <04607480-CDE2-453F-BBBF-8F946B1DDAEE@mac.com> References: <04607480-CDE2-453F-BBBF-8F946B1DDAEE@mac.com> Message-ID: I assume you mean 0.6.3 (the latest one) should no longer have this issue. 0.6.3 isn't working for me but it could be other issues (e.g., something that is my fault). I will dig deeper and report back if I find anything interesting. On Sun, Jun 5, 2011 at 9:18 AM, Ronald Oussoren wrote: > > On 3 Jun, 2011, at 20:04, Jeffrey O'Neill wrote: > > > I've used py2app for many years with great success. I'm now running into > a problem and I suspect it is issue 19 that is causing the problem. > > > > My setup.py file includes data resources. From issue 19, it looks like > this is broken with the 0.6.* series. > > > > What is the most recent version of py2app that does not have this bug? > > Release 0.6.2 should no longer have this issue (and I seem to have > forgotten to close the issue after doing that release). > > Could you test this release to see if the problem has really been fixed? > > Ronald -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff.oneill at openstv.org Mon Jun 6 03:24:45 2011 From: jeff.oneill at openstv.org (Jeffrey O'Neill) Date: Sun, 5 Jun 2011 21:24:45 -0400 Subject: [Pythonmac-SIG] debugging bus error on launch [py2app] Message-ID: I've used py2app for many years and have really appreciated how it makes it so easy to distribute my app. I'm now running into problems and would appreciate suggestions for how to debug. My setup: -- Snow Leopard -- 32-bit Python 2.7 from python.org -- py2app 6.3 -- only external package is wxPython 2.8.12.0 (32-bit, Carbon, unicode) The changes from my last successful use of py2app six months ago are (1) moving from python 2.6 to python 2.7; (2) upgrading to latest py2app (don't know what I had before but I think it was at least a couple years old); and (3) changes to my python code that should not be significant. When I do python setup.mac.py py2app everything seems to operate fine. Stuff gets copied to build dir, creates app bundle, stripping, etc... (Tried this both with and without -A). When I run out of the dist dir: $ ./dist/OpenSTV.app/Contents/MacOS/OpenSTV I get Bus error with a dump. I don't know where to begin debugging this and would greatly appreciate pointers. My setup.mac.py is copied below and also the dump that OS X provides. Note that my setup is a little complicated because I use __import__ and have to explicitly list the stuff that is being imported that way. Jeff ==== setup.mac.py ==== import sys import os import glob import shutil import pkgutil from setuptools import setup from openstv.version import v as OpenSTV_version # Remove the build and dist folders shutil.rmtree("build", ignore_errors=True) shutil.rmtree("dist", ignore_errors=True) # generic arguments for setup() name = "OpenSTV" description = "Implements the single transferable vote, instant runoff "\ "voting, and several other voting systems." author = "Jeff O'Neill" author_email = "jeff.oneill at example.org" url = "http://www.openstv.org" license = "OpenSTV EULA" packages = ["openstv", "openstv.MethodPlugins", "openstv.LoaderPlugins", "openstv.ReportPlugins"] data_files = [ ("", ["openstv/Help.html", "openstv/License.html"]), ("Icons", ["openstv/Icons/pie.ico", "openstv/Icons/blt.ico", "openstv/Icons/splash.png"]) ] # Get list of plugins because they won't be automatically included includes = [] pluginPackageNames = ["openstv.MethodPlugins", "openstv.LoaderPlugins", "openstv.ReportPlugins"] for x in pluginPackageNames: package = __import__(x, fromlist="dummy") ppath = package.__path__ pname = package.__name__ + "." for importer, modname, ispkg in pkgutil.iter_modules(ppath, pname): includes.append(modname) if sys.platform == "darwin": # # Usage: ./setup.py # # py2app options plist = { "CFBundleDocumentTypes": [{"CFBundleTypeName": "OpenSTV ballot file", "CFBundleTypeIconFile": "blt.icns", "CFBundleTypeExtensions": ["blt", "txt"], "CFBundleTypeRole": "Viewer"}] } py2app_options = dict( includes = includes, plist = plist, iconfile = 'openstv/Icons/pie.icns', no_strip = 0, ) setup(name = name, script_name = 'setup.py', script_args = ['py2app'], version = OpenSTV_version, description = description, author = author, author_email = author_email, url = url, license = license, packages = packages, data_files = data_files, options = dict(py2app = py2app_options), scripts = ['openstv/OpenSTV.py'], app = ['openstv/OpenSTV.py'], setup_requires = ["py2app"], ) os.system("hdiutil create -ov -imagekey zlib-level=9 -srcfolder dist/OpenSTV.app dist/OpenSTV.dmg") ==== Dump ==== Process: OpenSTV [1299] Path: /Users/joneill/OpenSTV/OpenSTV/dist/OpenSTV.app/Contents/MacOS/OpenSTV Identifier: OpenSTV Version: ??? (???) Code Type: X86 (Native) Parent Process: bash [466] Date/Time: 2011-06-05 21:15:26.454 -0400 OS Version: Mac OS X 10.6.7 (10J869) Report Version: 6 Interval Since Last Report: 1290371 sec Crashes Since Last Report: 17 Per-App Crashes Since Last Report: 16 Anonymous UUID: 4449D1E2-549A-4752-9ACA-F453FB09A892 Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000 Crashed Thread: 0 Dispatch queue: com.apple.main-thread Application Specific Information: objc_msgSend() selector name: copy Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 libobjc.A.dylib 0x953caedb objc_msgSend + 27 1 com.apple.CoreFoundation 0x9387f8ee cacheBundleInfo + 190 2 com.apple.CoreFoundation 0x9387f82d _CFAppVersionCheckLessThan + 157 3 com.apple.CoreFoundation 0x93879704 __CFInitialize + 2004 4 dyld 0x8fe0ee40 ImageLoaderMachO::doImageInit(ImageLoader::LinkContext const&) + 154 5 dyld 0x8fe0ee74 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 30 6 dyld 0x8fe0d31e ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int) + 246 7 dyld 0x8fe0d3d1 ImageLoader::runInitializers(ImageLoader::LinkContext const&) + 61 8 dyld 0x8fe0200b dyld::runInitializers(ImageLoader*) + 34 9 dyld 0x8fe0b299 dlopen + 558 10 libSystem.B.dylib 0x94128848 dlopen + 66 11 ...thonmac.unspecified.OpenSTV 0x00005a9f main + 63 12 ...thonmac.unspecified.OpenSTV 0x000017e2 start + 258 13 ...thonmac.unspecified.OpenSTV 0x00001709 start + 41 Thread 0 crashed with X86 Thread State (32-bit): eax: 0x00103bc0 ebx: 0x93880964 ecx: 0x918f3858 edx: 0x001012f0 edi: 0x00000000 esi: 0x00103bc0 ebp: 0xbfffefe8 esp: 0xbfffef94 ss: 0x0000001f efl: 0x00010206 eip: 0x953caedb cs: 0x00000017 ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037 cr2: 0x00000000 Binary Images: 0x1000 - 0x6ff7 +org.pythonmac.unspecified.OpenSTV ( 1, 9, 0 ) (( 1, 9, 0 )) <62637566-0890-030C-A884-540872ADC1F3> /Users/joneill/OpenSTV/OpenSTV/dist/OpenSTV.app/Contents/MacOS/OpenSTV 0x8fe00000 - 0x8fe4162b dyld 132.1 (???) /usr/lib/dyld 0x9236a000 - 0x92378fe7 libz.1.dylib 1.2.3 (compatibility 1.0.0) <3CE8AA79-F077-F1B0-A039-9103A4A02E92> /usr/lib/libz.1.dylib 0x93877000 - 0x939f2fe7 com.apple.CoreFoundation 6.6.4 (550.42) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x93e1b000 - 0x93e61ff7 libauto.dylib ??? (???) <29422A70-87CF-10E2-CE59-FEE1234CFAAE> /usr/lib/libauto.dylib 0x94121000 - 0x942c8ff7 libSystem.B.dylib 125.2.10 (compatibility 1.0.0) /usr/lib/libSystem.B.dylib 0x94fe6000 - 0x94fe9fe7 libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) <1622A54F-1A98-2CBE-B6A4-2122981A500E> /usr/lib/system/libmathCommon.A.dylib 0x953c5000 - 0x95472fe7 libobjc.A.dylib 227.0.0 (compatibility 1.0.0) /usr/lib/libobjc.A.dylib 0x97cc9000 - 0x97d33fe7 libstdc++.6.dylib 7.9.0 (compatibility 7.0.0) <411D87F4-B7E1-44EB-F201-F8B4F9227213> /usr/lib/libstdc++.6.dylib 0x990fa000 - 0x9927cfe7 libicucore.A.dylib 40.0.0 (compatibility 1.0.0) /usr/lib/libicucore.A.dylib 0xffff0000 - 0xffff1fff libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib _________________________________________________________ OpenSTV -- Software for ranked-choice and preferential voting systems http://www.OpenSTV.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronaldoussoren at mac.com Mon Jun 6 16:04:27 2011 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 06 Jun 2011 07:04:27 -0700 Subject: [Pythonmac-SIG] debugging bus error on launch [py2app] In-Reply-To: References: Message-ID: On 5 Jun, 2011, at 18:24, Jeffrey O'Neill wrote: > I've used py2app for many years and have really appreciated how it makes it so easy to distribute my app. I'm now running into problems and would appreciate suggestions for how to debug. My setup: > -- Snow Leopard > -- 32-bit Python 2.7 from python.org > -- py2app 6.3 > -- only external package is wxPython 2.8.12.0 (32-bit, Carbon, unicode) > > The changes from my last successful use of py2app six months ago are (1) moving from python 2.6 to python 2.7; (2) upgrading to latest py2app (don't know what I had before but I think it was at least a couple years old); and (3) changes to my python code that should not be significant. > > When I do > python setup.mac.py py2app > everything seems to operate fine. Stuff gets copied to build dir, creates app bundle, stripping, etc... (Tried this both with and without -A). > > When I run out of the dist dir: > $ ./dist/OpenSTV.app/Contents/MacOS/OpenSTV > I get > Bus error > with a dump. > > I don't know where to begin debugging this and would greatly appreciate pointers. My setup.mac.py is copied below and also the dump that OS X provides. Note that my setup is a little complicated because I use __import__ and have to explicitly list the stuff that is being imported that way. The setup file looks fine. What you could try is to build using '--no-strip' and then use 'gdb ./dist/OpenSTV.app/Contents/MacOS/OpenSTV'. With some luck this gives a hint on what causes the crash. Are you by any change importing GUI code in a secondary thread? I've seen crashes in __CFInitialize before when Apple's frameworks get loaded on any thread that isn't the main thread. Ronald -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From jeff.oneill at openstv.org Mon Jun 6 18:56:09 2011 From: jeff.oneill at openstv.org (Jeffrey O'Neill) Date: Mon, 6 Jun 2011 12:56:09 -0400 Subject: [Pythonmac-SIG] debugging bus error on launch [py2app] In-Reply-To: References: Message-ID: On Mon, Jun 6, 2011 at 10:04 AM, Ronald Oussoren wrote: > > The setup file looks fine. What you could try is to build using > '--no-strip' and then use 'gdb ./dist/OpenSTV.app/Contents/MacOS/OpenSTV'. > With some luck this gives a hint on what causes the crash. > > Are you by any change importing GUI code in a secondary thread? I've seen > crashes in __CFInitialize before when Apple's frameworks get loaded on any > thread that isn't the main thread. > Hi Ronald, Thanks for the suggestions. I'm not importing GUI code in a thread (and threads are not used in launching the app either) so that is not causing the problem. I tried gdb with no-strip and the output is below. It doesn't help me any. :( GDB says it is x86_64-apple-darwin while my app is 32 bit but I don't know if that matters. Jeff ==== gdb output ==== $ gdb ./dist/OpenSTV.app/Contents/MacOS/OpenSTV ... This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .. done (gdb) run Starting program: /Users/joneill/OpenSTV/OpenSTV/dist/OpenSTV.app/Contents/MacOS/OpenSTV Reading symbols for shared libraries +. done Reading symbols for shared libraries ...... done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000000 0x953caedb in objc_msgSend () (gdb) bt #0 0x953caedb in objc_msgSend () #1 0x00103bc0 in ?? () #2 0x9387f8ee in cacheBundleInfo () #3 0x9387f82d in _CFAppVersionCheckLessThan () #4 0x93879704 in __CFInitialize () #5 0x8fe0ee40 in __dyld__ZN16ImageLoaderMachO11doImageInitERKN11ImageLoader11LinkContextE () #6 0x8fe0ee74 in __dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE () #7 0x8fe0d31e in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj () #8 0x8fe0d3d1 in __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextE () #9 0x8fe0200b in __dyld__ZN4dyld15runInitializersEP11ImageLoader () #10 0x8fe0b299 in __dyld_dlopen () #11 0x94128848 in dlopen () #12 0x00005a9f in main () -------------- next part -------------- An HTML attachment was scrubbed... URL: From cweisiger at msg.ucsf.edu Mon Jun 6 19:08:58 2011 From: cweisiger at msg.ucsf.edu (Chris Weisiger) Date: Mon, 6 Jun 2011 10:08:58 -0700 Subject: [Pythonmac-SIG] debugging bus error on launch [py2app] In-Reply-To: References: Message-ID: On Mon, Jun 6, 2011 at 9:56 AM, Jeffrey O'Neill wrote: > > On Mon, Jun 6, 2011 at 10:04 AM, Ronald Oussoren wrote: > >> >> The setup file looks fine. What you could try is to build using >> '--no-strip' and then use 'gdb ./dist/OpenSTV.app/Contents/MacOS/OpenSTV'. >> With some luck this gives a hint on what causes the crash. >> >> Are you by any change importing GUI code in a secondary thread? I've seen >> crashes in __CFInitialize before when Apple's frameworks get loaded on any >> thread that isn't the main thread. >> > > Hi Ronald, > > Thanks for the suggestions. I'm not importing GUI code in a thread (and > threads are not used in launching the app either) so that is not causing the > problem. > > I tried gdb with no-strip and the output is below. It doesn't help me any. > :( GDB says it is x86_64-apple-darwin while my app is 32 bit but I don't > know if that matters. > That sounds like it would cause a problem. :) You said you upgraded your Python install; are you sure you got the 32-bit version? If you do import platform; print platform.architecture() what do you get? Does the program work properly when not built as an app? -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff.oneill at openstv.org Mon Jun 6 19:15:40 2011 From: jeff.oneill at openstv.org (Jeffrey O'Neill) Date: Mon, 6 Jun 2011 13:15:40 -0400 Subject: [Pythonmac-SIG] debugging bus error on launch [py2app] In-Reply-To: References: Message-ID: On Mon, Jun 6, 2011 at 1:08 PM, Chris Weisiger wrote: > On Mon, Jun 6, 2011 at 9:56 AM, Jeffrey O'Neill wrote: > >> >> Hi Ronald, >> >> Thanks for the suggestions. I'm not importing GUI code in a thread (and >> threads are not used in launching the app either) so that is not causing the >> problem. >> >> I tried gdb with no-strip and the output is below. It doesn't help me >> any. :( GDB says it is x86_64-apple-darwin while my app is 32 bit but I >> don't know if that matters. >> > > That sounds like it would cause a problem. :) You said you upgraded your > Python install; are you sure you got the 32-bit version? If you do > > import platform; print platform.architecture() > > what do you get? > > Does the program work properly when not built as an app? > Yes, definitely 32-bit Python: $ python Python 2.7.1 (r271:86882M, Nov 30 2010, 09:39:13) [GCC 4.0.1 (Apple Inc. build 5494)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import platform; print platform.architecture() ('32bit', '') My app works fine when run without py2app. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chris.Barker at noaa.gov Mon Jun 6 19:16:26 2011 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 06 Jun 2011 10:16:26 -0700 Subject: [Pythonmac-SIG] debugging bus error on launch [py2app] In-Reply-To: References: Message-ID: <4DED0B6A.7020306@noaa.gov> Jeffrey O'Neill wrote: > I've used py2app for many years and have really appreciated how it makes > it so easy to distribute my app. I'm now running into problems and > would appreciate suggestions for how to debug. You've probably done this, but just to make sure: Delete the entirety of the "build" and "dist" directories and re-run py2app -- sometimes left over cruft gets in the way when you change things. -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.Barker at noaa.gov From ronaldoussoren at mac.com Tue Jun 7 15:53:27 2011 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 07 Jun 2011 06:53:27 -0700 Subject: [Pythonmac-SIG] debugging bus error on launch [py2app] In-Reply-To: References: Message-ID: On 6 Jun, 2011, at 9:56, Jeffrey O'Neill wrote: > > On Mon, Jun 6, 2011 at 10:04 AM, Ronald Oussoren wrote: > > The setup file looks fine. What you could try is to build using '--no-strip' and then use 'gdb ./dist/OpenSTV.app/Contents/MacOS/OpenSTV'. With some luck this gives a hint on what causes the crash. > > Are you by any change importing GUI code in a secondary thread? I've seen crashes in __CFInitialize before when Apple's frameworks get loaded on any thread that isn't the main thread. > > Hi Ronald, > > Thanks for the suggestions. I'm not importing GUI code in a thread (and threads are not used in launching the app either) so that is not causing the problem. I could have known that, the crashdump mentioned that the crash occurs in the main thread... > > I tried gdb with no-strip and the output is below. It doesn't help me any. :( GDB says it is x86_64-apple-darwin while my app is 32 bit but I don't know if that matters. That's not a problem, you're running GDB on a machine that can run 64-bit code. > > Jeff > > ==== gdb output ==== > > $ gdb ./dist/OpenSTV.app/Contents/MacOS/OpenSTV > ... > This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .. done > > (gdb) run > Starting program: /Users/joneill/OpenSTV/OpenSTV/dist/OpenSTV.app/Contents/MacOS/OpenSTV > Reading symbols for shared libraries +. done > Reading symbols for shared libraries ...... done > > Program received signal EXC_BAD_ACCESS, Could not access memory. > Reason: KERN_PROTECTION_FAILURE at address: 0x00000000 > 0x953caedb in objc_msgSend () > > (gdb) bt > #0 0x953caedb in objc_msgSend () > #1 0x00103bc0 in ?? () > #2 0x9387f8ee in cacheBundleInfo () > #3 0x9387f82d in _CFAppVersionCheckLessThan () > #4 0x93879704 in __CFInitialize () > #5 0x8fe0ee40 in __dyld__ZN16ImageLoaderMachO11doImageInitERKN11ImageLoader11LinkContextE () > #6 0x8fe0ee74 in __dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE () > #7 0x8fe0d31e in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj () > #8 0x8fe0d3d1 in __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextE () > #9 0x8fe0200b in __dyld__ZN4dyld15runInitializersEP11ImageLoader () > #10 0x8fe0b299 in __dyld_dlopen () > #11 0x94128848 in dlopen () > #12 0x00005a9f in main () > That's not very helpful, and it turns out that's because the exutable that I ship with py2app doesn't have debug symbols. 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. Ronald -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From smartmike1 at gmail.com Wed Jun 8 04:38:47 2011 From: smartmike1 at gmail.com (Mike) Date: Tue, 7 Jun 2011 22:38:47 -0400 Subject: [Pythonmac-SIG] Getting an Error When Running App built with Py2app Message-ID: <63F710D185284497B5EE75DA2E8736FB@FTXH9K1> Hi, I built my python program using Py2app, using the default setup.py script. I'm running Mac OSX Snow Leopard 64 bit. My project uses WX. Initially, I was getting an error import error: no module named wx when I ran the app, so I went and downloaded and installed WXPython from wxpython.org. Now I get the following error: <_FuncPtr object at 0xc1cd8> Traceback (most recent call last): File "/Users/mike/rsg-client/src/dist/rsg.app/Contents/Resources/__boot__.py", line 187, in _run('rsg.py') File "/Users/mike/rsg-client/src/dist/rsg.app/Contents/Resources/__boot__.py", line 184, in _run execfile(path, globals(), globals()) File "/Users/mike/rsg-client/src/dist/rsg.app/Contents/Resources/rsg.py", line 8, in import gui File "gui.pyc", line 7, in File "keyMap.pyc", line 1, in File "wx/__init__.pyc", line 45, in File "wx/_core.pyc", line 4, in File "wx/_core_.pyc", line 18, in File "wx/_core_.pyc", line 15, in __load ImportError: '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/wx/_core_.so' not found 2011-06-07 20:55:05.194 rsg[480:a07] rsg Error I preceded both my build and run commands with arch -i386, if that helps. Any help would be appreciated. Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chris.Barker at noaa.gov Wed Jun 8 07:12:18 2011 From: Chris.Barker at noaa.gov (Chris Barker) Date: Tue, 07 Jun 2011 22:12:18 -0700 Subject: [Pythonmac-SIG] Getting an Error When Running App built with Py2app In-Reply-To: <63F710D185284497B5EE75DA2E8736FB@FTXH9K1> References: <63F710D185284497B5EE75DA2E8736FB@FTXH9K1> Message-ID: <4DEF04B2.9060202@noaa.gov> 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.Barker at noaa.gov From Chris.Barker at noaa.gov Wed Jun 8 17:29:43 2011 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 08 Jun 2011 08:29:43 -0700 Subject: [Pythonmac-SIG] Getting an Error When Running App built with Py2app In-Reply-To: References: <63F710D185284497B5EE75DA2E8736FB@FTXH9K1> <4DEF04B2.9060202@noaa.gov> Message-ID: <4DEF9567.6060900@noaa.gov> Chris, I think your note didn't get posted to the list (you have to "reply all"), so here it is: Chris Weisiger wrote: > On Tue, Jun 7, 2011 at 10:12 PM, Chris Barker which python are you using? Py2app is really expected to work right > with Apple's built-in python (it can't include python itself) > > That should be "is really *NOT* expected to work right...". :) oops, yes, that is what I meant! -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.Barker at noaa.gov From ronaldoussoren at mac.com Wed Jun 8 23:02:42 2011 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 08 Jun 2011 14:02:42 -0700 Subject: [Pythonmac-SIG] Getting an Error When Running App built with Py2app In-Reply-To: <4DEF9567.6060900@noaa.gov> References: <63F710D185284497B5EE75DA2E8736FB@FTXH9K1> <4DEF04B2.9060202@noaa.gov> <4DEF9567.6060900@noaa.gov> Message-ID: On 8 Jun, 2011, at 8:29, Christopher Barker wrote: > Chris, > > I think your note didn't get posted to the list (you have to "reply all"), so here it is: > > Chris Weisiger wrote: >> On Tue, Jun 7, 2011 at 10:12 PM, Chris Barker > with Apple's built-in python (it can't include python itself) > >> That should be "is really *NOT* expected to work right...". :) > > oops, yes, that is what I meant! And that's wrong. Py2app should work just fine with Apple's python, and then creates a semi-standalone app bundle that doesn't include Python itself. The advantage is a smaller application bundle, the disadvantage is that you must run it on the same OSX release as you built it on (or a newer one, AFAIK the result of building on 10.5 can run on 10.6) Ronald > > -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.Barker at noaa.gov > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From ronaldoussoren at mac.com Wed Jun 8 23:07:56 2011 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 08 Jun 2011 14:07:56 -0700 Subject: [Pythonmac-SIG] Getting an Error When Running App built with Py2app In-Reply-To: <63F710D185284497B5EE75DA2E8736FB@FTXH9K1> References: <63F710D185284497B5EE75DA2E8736FB@FTXH9K1> Message-ID: <71F37390-D324-4B49-8FD5-30BFBFB5CC95@mac.com> On 7 Jun, 2011, at 19:38, 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. My project uses WX. Initially, I was getting an error import error: no module named wx when I ran the app, so I went and downloaded and installed WXPython from wxpython.org. Now I get the following error: Which version of py2app do you use? I vaguely recall an issue with py2app that was simular to what you are experiencing: py2app looking for libraries in a system location for extensions instead of loading them from the application bundle. That bug should be fixed in the most recent release of py2app (0.6.3) Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From Chris.Barker at noaa.gov Thu Jun 9 00:15:23 2011 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 08 Jun 2011 15:15:23 -0700 Subject: [Pythonmac-SIG] Getting an Error When Running App built with Py2app In-Reply-To: References: <63F710D185284497B5EE75DA2E8736FB@FTXH9K1> <4DEF04B2.9060202@noaa.gov> <4DEF9567.6060900@noaa.gov> Message-ID: <4DEFF47B.8050505@noaa.gov> Ronald Oussoren wrote: >>> That should be "is really *NOT* expected to work right...". :) > And that's wrong. Py2app should work just fine with Apple's python, > and then creates a semi-standalone app bundle that doesn't include > Python itself. The advantage is a smaller application bundle, the > disadvantage is that you must run it on the same OSX release as you > built it on (or a newer one, AFAIK the result of building on 10.5 can > run on 10.6) OK -- I've always know that that was supposed to be the case, and a py2app'd bundle should certainly work on the machine it was built on anyway. However, if I recall correctly, there have been issues for years with not just the core Python distribution not being included, but things getting ugly with installed add on packages not getting included either (or not properly). So I've always stayed away from trying, and encouraged others to do the same. That experience may be the result of bugs that no longer exist. OTOH, if, indeed, using the system python results in a smaller bundle that works just fine on all versions of OS-X >= to the one it was built on -- that could be really nice and useful. -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.Barker at noaa.gov From ronaldoussoren at mac.com Thu Jun 9 01:30:43 2011 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 08 Jun 2011 16:30:43 -0700 Subject: [Pythonmac-SIG] Getting an Error When Running App built with Py2app In-Reply-To: <4DEFF47B.8050505@noaa.gov> References: <63F710D185284497B5EE75DA2E8736FB@FTXH9K1> <4DEF04B2.9060202@noaa.gov> <4DEF9567.6060900@noaa.gov> <4DEFF47B.8050505@noaa.gov> Message-ID: On 8 Jun, 2011, at 15:15, Christopher Barker wrote: > Ronald Oussoren wrote: >>>> That should be "is really *NOT* expected to work right...". :) > >> And that's wrong. Py2app should work just fine with Apple's python, >> and then creates a semi-standalone app bundle that doesn't include >> Python itself. The advantage is a smaller application bundle, the >> disadvantage is that you must run it on the same OSX release as you >> built it on (or a newer one, AFAIK the result of building on 10.5 can >> run on 10.6) > > OK -- I've always know that that was supposed to be the case, and a py2app'd bundle should certainly work on the machine it was built on anyway. > > However, if I recall correctly, there have been issues for years with not just the core Python distribution not being included, but things getting ugly with installed add on packages not getting included either (or not properly). So I've always stayed away from trying, and encouraged others to do the same. That experience may be the result of bugs that no longer exist. > > > OTOH, if, indeed, using the system python results in a smaller bundle that works just fine on all versions of OS-X >= to the one it was built on -- that could be really nice and useful. That's the intention, but there may still be bugs as py2app still has fairly minimal test coverage and I don't use the system python for my day-to-day work. I'm adding new tests with every bugfix, but that's not good enough to get proper test coverage in a reasonable timeframe. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From Chris.Barker at noaa.gov Thu Jun 9 19:28:12 2011 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 09 Jun 2011 10:28:12 -0700 Subject: [Pythonmac-SIG] Getting an Error When Running App built with Py2app In-Reply-To: <2F643D70F6F64A688F4EBFA5E9CD2699@FTXH9K1> References: <63F710D185284497B5EE75DA2E8736FB@FTXH9K1> <4DEF04B2.9060202@noaa.gov> <2F643D70F6F64A688F4EBFA5E9CD2699@FTXH9K1> Message-ID: <4DF102AC.4070600@noaa.gov> 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.Barker at 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.Barker at noaa.gov From jeff.oneill at openstv.org Fri Jun 10 01:10:29 2011 From: jeff.oneill at openstv.org (Jeffrey O'Neill) Date: Thu, 9 Jun 2011 19:10:29 -0400 Subject: [Pythonmac-SIG] debugging bus error on launch [py2app] In-Reply-To: References: Message-ID: 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! -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff.oneill at openstv.org Fri Jun 10 04:02:48 2011 From: jeff.oneill at openstv.org (Jeffrey O'Neill) Date: Thu, 9 Jun 2011 22:02:48 -0400 Subject: [Pythonmac-SIG] debugging bus error on launch [py2app] In-Reply-To: References: Message-ID: 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! > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronaldoussoren at mac.com Fri Jun 10 05:42:36 2011 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 09 Jun 2011 20:42:36 -0700 Subject: [Pythonmac-SIG] debugging bus error on launch [py2app] In-Reply-To: References: Message-ID: <54415AF5-9C8B-4881-9685-2FB4FB9BD8B5@mac.com> 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! > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From smartmike1 at gmail.com Sun Jun 12 21:02:32 2011 From: smartmike1 at gmail.com (Mike) Date: Sun, 12 Jun 2011 15:02:32 -0400 Subject: [Pythonmac-SIG] Getting an Error When Running App built with Py2app References: <63F710D185284497B5EE75DA2E8736FB@FTXH9K1> <4DEF04B2.9060202@noaa.gov> <2F643D70F6F64A688F4EBFA5E9CD2699@FTXH9K1> <4DF102AC.4070600@noaa.gov> Message-ID: <40307D05EF974DE4944329DC1C53DE07@FTXH9K1> Hi, Tried installing Python 2.7 32 bit and WXPython. I now get import error: no module named appkit I assume this means I would have to install XCode, then PyObjC for the py2.7 build. Correct me if I'm wrong... Would much rather get this working with the built in python, but not sure what else to try. Mike ----- Original Message ----- From: "Christopher Barker" To: "Mike" ; "Pythonmac-sig" Sent: Thursday, June 09, 2011 1:28 PM Subject: Re: [Pythonmac-SIG] Getting an Error When Running App built with Py2app > 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.Barker at 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.Barker at noaa.gov From smartmike1 at gmail.com Sun Jun 12 23:13:01 2011 From: smartmike1 at gmail.com (Mike) Date: Sun, 12 Jun 2011 17:13:01 -0400 Subject: [Pythonmac-SIG] Getting an Error When Running App built with Py2app References: <63F710D185284497B5EE75DA2E8736FB@FTXH9K1> <4DEF04B2.9060202@noaa.gov> <2F643D70F6F64A688F4EBFA5E9CD2699@FTXH9K1> <4DF102AC.4070600@noaa.gov> Message-ID: <9AF00DFA6AB04FC6A29C69135AB70212@FTXH9K1> I also just tried installing python2.6.6 from python.org, but when I run python2.6, it still claims i'm running python 2.6.1. Any idea how to fix this? Mike ----- Original Message ----- From: "Christopher Barker" To: "Mike" ; "Pythonmac-sig" Sent: Thursday, June 09, 2011 1:28 PM Subject: Re: [Pythonmac-SIG] Getting an Error When Running App built with Py2app > 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.Barker at 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.Barker at noaa.gov From w.t.douglas at abdn.ac.uk Mon Jun 13 08:04:30 2011 From: w.t.douglas at abdn.ac.uk (Tuladhar-douglas, Dr William B.) Date: Mon, 13 Jun 2011 07:04:30 +0100 Subject: [Pythonmac-SIG] TZ and Plone. Message-ID: Folks, I've lurked here picking up tips for some years and now need to seek the collective wisdom of the list (which may well be, ?go ask somewhere else?, but that would also be okay.) Most conversations on this list are about PyObjC and Py2App, but I've run up against a genuinely obscure bug in Plone that appears to derive from underlying Python behaviour on Unix machines, and wouldn't mind some pointers on how to fix it at least for OSX. I'm trying to install Plone 4.05 on my Mac (OSX 10.6.7), using the universal installer which uses buildout. (It works fine on the London server that holds the public Plone site...) After much frustration I finally found another person with the same obscure problem, also in Kathmandu. See here:http://bibekpaudel.wordpress.com/2009/11/26/solved-plone-installation-strange-error/ , here: http://www.khattam.info/solved-module-datetime-datetime-line-1145-in-tozone-2010-08-19.html , and here: http://dev.plone.org/plone/ticket/9857 for the bug report. Apparently the fix has been deferred repeatedly. Essentially, because I'm in Kathmandu, Nepal right now (and will be for the next few years on a research project), timezone support doesn't work right so eventually, Plone becomes confused when it tries to make a new site. The root of the problem seems to be way back down at the Unix-level implementation of timezone support. Nepal is often a difficult case as its TZ is set at GMT+4:45 or GMT+5:45 depending on the time of year. So if I wanted to pursue a fix for this one, how might I begin? -WBTD. - - -- --- ----- -------- ------------- Will Tuladhar-Douglas Anthropology of Environment and Religions http://tending.to/garden The University of Aberdeen is a charity registered in Scotland, No SC013683. From aahz at pythoncraft.com Mon Jun 13 17:21:05 2011 From: aahz at pythoncraft.com (Aahz) Date: Mon, 13 Jun 2011 08:21:05 -0700 Subject: [Pythonmac-SIG] TZ and Plone. In-Reply-To: References: Message-ID: <20110613152105.GA9896@panix.com> On Mon, Jun 13, 2011, Tuladhar-douglas, Dr William B. wrote: > > I'm trying to install Plone 4.05 on my Mac (OSX 10.6.7), using the universal installer which uses buildout. (It works fine on the London server that holds the public Plone site...) After much frustration I finally found another person with the same obscure problem, also in Kathmandu. See here:http://bibekpaudel.wordpress.com/2009/11/26/solved-plone-installation-strange-error/ , here: http://www.khattam.info/solved-module-datetime-datetime-line-1145-in-tozone-2010-08-19.html , and here: http://dev.plone.org/plone/ticket/9857 for the bug report. Apparently the fix has been deferred repeatedly. > > Essentially, because I'm in Kathmandu, Nepal right now (and will be for the next few years on a research project), timezone support doesn't work right so eventually, Plone becomes confused when it tries to make a new site. The root of the problem seems to be way back down at the Unix-level implementation of timezone support. Nepal is often a difficult case as its TZ is set at GMT+4:45 or GMT+5:45 depending on the time of year. > > So if I wanted to pursue a fix for this one, how might I begin? It's not clear what searching you've on just the Unix side. Does this problem show up outside the Python context? -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ Looking back over the years, after I learned Python I realized that I never really had enjoyed programming before. From janssen at parc.com Mon Jun 13 18:35:20 2011 From: janssen at parc.com (Bill Janssen) Date: Mon, 13 Jun 2011 09:35:20 PDT Subject: [Pythonmac-SIG] TZ and Plone. In-Reply-To: References: Message-ID: <28875.1307982920@parc.com> William, > Essentially, because I'm in Kathmandu, Nepal right now (and will be > for the next few years on a research project), timezone support > doesn't work right so eventually, Plone becomes confused when it tries > to make a new site. The root of the problem seems to be way back down > at the Unix-level implementation of timezone support. Nepal is often a > difficult case as its TZ is set at GMT+4:45 or GMT+5:45 depending on > the time of year. I'm not sure why you think this is a Unix-level thing? It appears to be a Zope issue, from the bug reports you pointed us to. So, I'd suggest the Zope bug-tracker (DateTime.DateTime.toZone is a Zope thing) as a good place to agitate for a fix. https://bugs.launchpad.net/zope/?field.searchtext=DateTime It looks to me as if variants of this bug have plagued Zope since 2002. Bill From Chris.Barker at noaa.gov Mon Jun 13 19:07:24 2011 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 13 Jun 2011 10:07:24 -0700 Subject: [Pythonmac-SIG] Getting an Error When Running App built with Py2app In-Reply-To: <9AF00DFA6AB04FC6A29C69135AB70212@FTXH9K1> References: <63F710D185284497B5EE75DA2E8736FB@FTXH9K1> <4DEF04B2.9060202@noaa.gov> <2F643D70F6F64A688F4EBFA5E9CD2699@FTXH9K1> <4DF102AC.4070600@noaa.gov> <9AF00DFA6AB04FC6A29C69135AB70212@FTXH9K1> Message-ID: <4DF643CC.6090404@noaa.gov> Mike wrote: > I also just tried installing python2.6.6 from python.org, but when I run > python2.6, it still claims i'm running python 2.6.1. Any idea how to fix > this? The installer _should_ have updated your PATH so that the newly installed version would run when you typed "python", but depending on how your shell is set up, it may not. try "which python" to see which one is being used. For instance, I get: /Library/Frameworks/Python.framework/Versions/2.7/bin/python That is the python.org binary. If you get something in /System/..., or in /usr/bin/ then you are getting Apple's python. (you can also try "which python2.6") Check out $PATH to see what is going on. You may need to mess with your .bash_profile to get $PATH right. (you did re-start the shell, didn't you?) Mike wrote: > Tried installing Python 2.7 32 bit and WXPython. I now get import error: > no module named appkit I think you need to install PyObjC for the python.org python to get appkit (though I'm no expert there). Do you really need both appkit and wxPython? You may well, I'm sure I'm showing my ignorance here. -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.Barker at noaa.gov From smartmike1 at gmail.com Tue Jun 14 04:24:17 2011 From: smartmike1 at gmail.com (Mike) Date: Mon, 13 Jun 2011 22:24:17 -0400 Subject: [Pythonmac-SIG] Getting an Error When Running App built with Py2app References: <63F710D185284497B5EE75DA2E8736FB@FTXH9K1> <4DEF04B2.9060202@noaa.gov> <2F643D70F6F64A688F4EBFA5E9CD2699@FTXH9K1> <4DF102AC.4070600@noaa.gov> <9AF00DFA6AB04FC6A29C69135AB70212@FTXH9K1> <4DF643CC.6090404@noaa.gov> Message-ID: <6146CBE834184B1AA2F05FD98A77F1BE@FTXH9K1> Hi, I'm trying to get Python 2.7 working. I was getting an error no module named appkit, so I assume i need to install pyobjc. I get the following error when I run easy_install pyobjc, as well as when I run setup.py in the trunk/pyobjc/pyobjc directory of the source code: Searching for pyobjc Best match: pyobjc 2.4a0 Processing pyobjc-2.4a0-py2.7.egg pyobjc 2.4a0 is already the active version in easy-install.pth Using /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyobjc-2.4a0-py2.7.egg Processing dependencies for pyobjc Searching for pyobjc-framework-ServiceManagement==2.4a0 Reading http://pypi.python.org/simple/pyobjc-framework-ServiceManagement/ Reading http://pyobjc.sourceforge.net No local packages or download links found for pyobjc-framework-ServiceManagement==2.4a0 error: Could not find suitable distribution for Requirement.parse('pyobjc-framework-ServiceManagement==2.4a0') Anyone have a solution for this? Mike----- Original Message ----- From: "Christopher Barker" To: "Mike" Cc: Sent: Monday, June 13, 2011 1:07 PM Subject: Re: [Pythonmac-SIG] Getting an Error When Running App built with Py2app > Mike wrote: >> I also just tried installing python2.6.6 from python.org, but when I run >> python2.6, it still claims i'm running python 2.6.1. Any idea how to fix >> this? > > The installer _should_ have updated your PATH so that the newly installed > version would run when you typed "python", but depending on how your shell > is set up, it may not. > > try "which python" to see which one is being used. For instance, I get: > > /Library/Frameworks/Python.framework/Versions/2.7/bin/python > > That is the python.org binary. If you get something in /System/..., or in > /usr/bin/ then you are getting Apple's python. > > (you can also try "which python2.6") > > Check out $PATH to see what is going on. > > You may need to mess with your .bash_profile to get $PATH right. > > (you did re-start the shell, didn't you?) > > Mike wrote: >> Tried installing Python 2.7 32 bit and WXPython. I now get import error: >> no module named appkit > > I think you need to install PyObjC for the python.org python to get appkit > (though I'm no expert there). > > Do you really need both appkit and wxPython? You may well, I'm sure I'm > showing my ignorance here. > > -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.Barker at noaa.gov From ronaldoussoren at mac.com Tue Jun 14 07:38:19 2011 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 14 Jun 2011 07:38:19 +0200 Subject: [Pythonmac-SIG] Getting an Error When Running App built with Py2app In-Reply-To: <6146CBE834184B1AA2F05FD98A77F1BE@FTXH9K1> References: <63F710D185284497B5EE75DA2E8736FB@FTXH9K1> <4DEF04B2.9060202@noaa.gov> <2F643D70F6F64A688F4EBFA5E9CD2699@FTXH9K1> <4DF102AC.4070600@noaa.gov> <9AF00DFA6AB04FC6A29C69135AB70212@FTXH9K1> <4DF643CC.6090404@noaa.gov> <6146CBE834184B1AA2F05FD98A77F1BE@FTXH9K1> Message-ID: <88311241-E73C-47C3-B773-24812048F6D0@mac.com> On 14 Jun, 2011, at 4:24, Mike wrote: > Hi, > > I'm trying to get Python 2.7 working. I was getting an error no module named appkit, so I assume i need to install pyobjc. I get the following error when I run easy_install pyobjc, as well as when I run setup.py in the trunk/pyobjc/pyobjc directory of the source code: Which version of OSX do you use? Ronald From ronaldoussoren at mac.com Tue Jun 14 07:37:07 2011 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 14 Jun 2011 07:37:07 +0200 Subject: [Pythonmac-SIG] Getting an Error When Running App built with Py2app In-Reply-To: <40307D05EF974DE4944329DC1C53DE07@FTXH9K1> References: <63F710D185284497B5EE75DA2E8736FB@FTXH9K1> <4DEF04B2.9060202@noaa.gov> <2F643D70F6F64A688F4EBFA5E9CD2699@FTXH9K1> <4DF102AC.4070600@noaa.gov> <40307D05EF974DE4944329DC1C53DE07@FTXH9K1> Message-ID: On 12 Jun, 2011, at 21:02, Mike wrote: > Hi, > > Tried installing Python 2.7 32 bit and WXPython. I now get import error: no > module named appkit > > I assume this means I would have to install XCode, then PyObjC for the py2.7 > build. Correct me if I'm wrong... Do you actually use PyObjC? > > Would much rather get this working with the built in python, but not sure > what else to try. As I wrote earlier: I'm pretty sure that this is an issue that's fixed in more recent versions of py2app, you could therefore try "easy_install -U py2app". This should install py2app 0.6.3. Ronald > > Mike > ----- Original Message ----- From: "Christopher Barker" > To: "Mike" ; "Pythonmac-sig" > Sent: Thursday, June 09, 2011 1:28 PM > Subject: Re: [Pythonmac-SIG] Getting an Error When Running App built with Py2app > > >> 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.Barker at 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.Barker at noaa.gov > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From ronaldoussoren at mac.com Tue Jun 14 11:08:49 2011 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 14 Jun 2011 11:08:49 +0200 Subject: [Pythonmac-SIG] Getting an Error When Running App built with Py2app In-Reply-To: References: <63F710D185284497B5EE75DA2E8736FB@FTXH9K1> <4DEF04B2.9060202@noaa.gov> <2F643D70F6F64A688F4EBFA5E9CD2699@FTXH9K1> <4DF102AC.4070600@noaa.gov> <40307D05EF974DE4944329DC1C53DE07@FTXH9K1> Message-ID: <95ADDD90-F7D3-4A49-9018-46970440CF1E@mac.com> On 14 Jun, 2011, at 7:37, Ronald Oussoren wrote: > > On 12 Jun, 2011, at 21:02, Mike wrote: > >> Hi, >> >> Tried installing Python 2.7 32 bit and WXPython. I now get import error: no >> module named appkit >> >> I assume this means I would have to install XCode, then PyObjC for the py2.7 >> build. Correct me if I'm wrong... > > Do you actually use PyObjC? That was a bit too terse. I was wondering why there is a dependency to appkit in a wxPython based program. Are you using PyObjC to get at some functionality that isn't exposed by wx? Ronald From smartmike1 at gmail.com Tue Jun 14 17:10:50 2011 From: smartmike1 at gmail.com (Mike) Date: Tue, 14 Jun 2011 11:10:50 -0400 Subject: [Pythonmac-SIG] Getting an Error When Running App built with Py2app References: <63F710D185284497B5EE75DA2E8736FB@FTXH9K1> <4DEF04B2.9060202@noaa.gov> <2F643D70F6F64A688F4EBFA5E9CD2699@FTXH9K1> <4DF102AC.4070600@noaa.gov> <40307D05EF974DE4944329DC1C53DE07@FTXH9K1> <95ADDD90-F7D3-4A49-9018-46970440CF1E@mac.com> Message-ID: <2CBF39371F7A4932A0131BB65C344D98@FTXH9K1> ----- Original Message ----- From: "Ronald Oussoren" To: "Mike" Cc: "Pythonmac-sig sig" Sent: Tuesday, June 14, 2011 5:08 AM Subject: Re: [Pythonmac-SIG] Getting an Error When Running App built with Py2app > > On 14 Jun, 2011, at 7:37, Ronald Oussoren wrote: > >> >> On 12 Jun, 2011, at 21:02, Mike wrote: >> >>> Hi, >>> >>> Tried installing Python 2.7 32 bit and WXPython. I now get import error: >>> no >>> module named appkit >>> >>> I assume this means I would have to install XCode, then PyObjC for the >>> py2.7 >>> build. Correct me if I'm wrong... >> >> Do you actually use PyObjC? > > That was a bit too terse. I was wondering why there is a dependency to > appkit in a wxPython based program. Are you using PyObjC to get at some > functionality that isn't exposed by wx? I'm running Snow Leopard, and yes I'm using PyObjC for something separate to Wx. Mike > > Ronald From jeff.oneill at openstv.org Sat Jun 18 16:38:57 2011 From: jeff.oneill at openstv.org (Jeffrey O'Neill) Date: Sat, 18 Jun 2011 10:38:57 -0400 Subject: [Pythonmac-SIG] [py2app] optimize and includes Message-ID: I'm using the latest py2app. Since my app uses __import__ to load some modules, I list those modules in the include option. This works great when optimization is turned off, but when I turn optimization on (1 or 2), the modules listed in the includes option go missing. Is there a fix for this? _________________________________________________________ OpenSTV -- Software for ranked-choice and preferential voting systems http://www.OpenSTV.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From brianz at gmail.com Tue Jun 21 07:47:47 2011 From: brianz at gmail.com (Brian Zambrano) Date: Mon, 20 Jun 2011 22:47:47 -0700 Subject: [Pythonmac-SIG] Py2app zlib import error Message-ID: I have a PyQt app which I've been compiling successfully for over a year on OS X 10.5. I've recently upgraded to a new system running 10.6, and my py2app builds are failing to boot after compilation. After some poking around, it looks like there are many other folks with the same issues, but I haven't found a solution yet. The error is: 'import site' failed; use -v for traceback Traceback (most recent call last): File "/Applications/RoastLogger.app/Contents/Resources/__boot__.py", line 4, in _chdir_resource() File "/Applications/RoastLogger.app/Contents/Resources/__boot__.py", line 2, in _chdir_resource import os zipimport.ZipImportError: can't decompress data; zlib not available ...which is identical to the first issue in this thread: http://mail.python.org/pipermail/pythonmac-sig/2010-September/022629.html zlib is present also: find . -name 'zlib*' ./Resources/lib/python2.6/lib-dynload/zlib.so I'm using 2.6.6 MacPython, Py2app 0.6.4, altgraph/modulegraph 0.9 and macholib==1.4.1. Are issues being accepted on the bitbucket page? I'd be happy to contribute in any way. BZ -------------- next part -------------- An HTML attachment was scrubbed... URL: From donovan.parks at gmail.com Wed Jun 22 15:46:58 2011 From: donovan.parks at gmail.com (Donovan Parks) Date: Wed, 22 Jun 2011 10:46:58 -0300 Subject: [Pythonmac-SIG] py2app: unknown required load command 0x800000022 Message-ID: Hello, I am porting a Python program I wrote on Windows to OS X. On Windows, I bundle the application using py2exe and have been using py2app on OS X. Using py2app I can obtain an app file that runs on OS X 10.6. However, when I copy the app file to other systems (OS X 10.5 or 10.6) I get the following errors: 22/06/11 10:35:01 AM [0x0-0x1c3cc3b].org.pythonmac.unspecified.STAMP[54569] dlopen(/Users/dparks/STAMP_APP_TEST/dist/STAMP.app/Contents/Frameworks/Python.framework/Versions/2.6/Python, 1): no suitable image found. Did find: 22/06/11 10:35:01 AM [0x0-0x1c3cc3b].org.pythonmac.unspecified.STAMP[54569] /Users/dparks/STAMP_APP_TEST/dist/STAMP.app/Contents/Frameworks/Python.framework/Versions/2.6/Python: unknown required load command 0x80000022 22/06/11 10:35:01 AM [0x0-0x1c3cc3b].org.pythonmac.unspecified.STAMP[54569] /Users/dparks/STAMP_APP_TEST/dist/STAMP.app/Contents/Frameworks/Python.framework/Versions/2.6/Python: unknown required load command 0x80000022 22/06/11 10:35:01 AM [0x0-0x1c3cc3b].org.pythonmac.unspecified.STAMP[54569] /Library/Frameworks/Python.framework/Versions/2.6/Python: no matching architecture in universal wrapper I'm using py2app 0.6.3 with python2.6, PyQt4, numpy, etc. obtained via macports. I have confirmed that a true standalone application is being built. It appears the 0x800000022 problem is fairly common when moving programs from 10.6 to 10.5. I'm surprised I'm having this problem on different 10.6 machines. I'd provide additional details, but am such a newb when it comes to OS X I'm not sure what is relevant. Any suggestions would be much appreciated. Cheers, Donovan From brianz at gmail.com Wed Jun 22 19:10:52 2011 From: brianz at gmail.com (Brian Zambrano) Date: Wed, 22 Jun 2011 10:10:52 -0700 Subject: [Pythonmac-SIG] py2app: unknown required load command 0x800000022 In-Reply-To: References: Message-ID: I hit exactly the same thing recently. The issue is that PyQt needs to be compiled against a suitable SDK....which is 10.5 in your case. You can follow this thread to the end to see what worked for me: http://www.riverbankcomputing.com/pipermail/pyqt/2011-June/029972.html However, I have no idea how PyQt is compiled for MacPorts. If you need to build from source it's really simple. BZ On Wed, Jun 22, 2011 at 6:46 AM, Donovan Parks wrote: > Hello, > > I am porting a Python program I wrote on Windows to OS X. On Windows, > I bundle the application using py2exe and have been using py2app on OS > X. Using py2app I can obtain an app file that runs on OS X 10.6. > However, when I copy the app file to other systems (OS X 10.5 or 10.6) > I get the following errors: > > 22/06/11 10:35:01 AM > [0x0-0x1c3cc3b].org.pythonmac.unspecified.STAMP[54569] > > dlopen(/Users/dparks/STAMP_APP_TEST/dist/STAMP.app/Contents/Frameworks/Python.framework/Versions/2.6/Python, > 1): no suitable image found. Did find: > 22/06/11 10:35:01 AM > [0x0-0x1c3cc3b].org.pythonmac.unspecified.STAMP[54569] > > /Users/dparks/STAMP_APP_TEST/dist/STAMP.app/Contents/Frameworks/Python.framework/Versions/2.6/Python: > unknown required load command 0x80000022 > 22/06/11 10:35:01 AM > [0x0-0x1c3cc3b].org.pythonmac.unspecified.STAMP[54569] > > /Users/dparks/STAMP_APP_TEST/dist/STAMP.app/Contents/Frameworks/Python.framework/Versions/2.6/Python: > unknown required load command 0x80000022 > 22/06/11 10:35:01 AM > [0x0-0x1c3cc3b].org.pythonmac.unspecified.STAMP[54569] > /Library/Frameworks/Python.framework/Versions/2.6/Python: no matching > architecture in universal wrapper > > I'm using py2app 0.6.3 with python2.6, PyQt4, numpy, etc. obtained via > macports. I have confirmed that a true standalone application is being > built. It appears the 0x800000022 problem is fairly common when moving > programs from 10.6 to 10.5. I'm surprised I'm having this problem on > different 10.6 machines. I'd provide additional details, but am such a > newb when it comes to OS X I'm not sure what is relevant. Any > suggestions would be much appreciated. > > Cheers, > Donovan > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chris.Barker at noaa.gov Wed Jun 22 19:59:01 2011 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 22 Jun 2011 10:59:01 -0700 Subject: [Pythonmac-SIG] py2app: unknown required load command 0x800000022 In-Reply-To: References: Message-ID: <4E022D65.9050901@noaa.gov> Donovan Parks wrote: > I'm using py2app 0.6.3 with python2.6, PyQt4, numpy, etc. obtained via > macports. The entire design of macports is based on users building what they need on the machine it is running on. As a result, it does NOT make it easy to build stuff that will run on other machines, particularly older versions of the OS. You may be able to get it all to work, but I suspect it will be a bit fragile as ports are updated. So I'd either: Build everything on the oldest OS you want to support. or Keep away from MacPorts for stuff you want to py2app (I'm surprized it works all, actually! ) The python.org builds are easy to use, install, and what py2app is mostly targeting and most tested with. I"m not sure of the state of binaries for pyQT, but they have certainliy existed in the past, and numpy is no problem. -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.Barker at noaa.gov From brianz at gmail.com Thu Jun 23 04:30:32 2011 From: brianz at gmail.com (Brian Zambrano) Date: Wed, 22 Jun 2011 19:30:32 -0700 Subject: [Pythonmac-SIG] Py2app zlib import error In-Reply-To: References: Message-ID: Just bumping this. Does anyone have solution or some advice on how to proceed? As a side note, it seems like many of the threads on this mailing list are py2app related but it's maintained by only one person? That's tough for the maintainer and the rest of the folks using it. Is there any place to start if we want to start contributing to py2app? It's a great project and I've been relying on it for quite a while...I'd love to help make it better. BZ On Mon, Jun 20, 2011 at 10:47 PM, Brian Zambrano wrote: > I have a PyQt app which I've been compiling successfully for over a year on > OS X 10.5. I've recently upgraded to a new system running 10.6, and my > py2app builds are failing to boot after compilation. After some poking > around, it looks like there are many other folks with the same issues, but I > haven't found a solution yet. > > The error is: > > 'import site' failed; use -v for traceback > Traceback (most recent call last): > File "/Applications/RoastLogger.app/Contents/Resources/__boot__.py", line > 4, in > _chdir_resource() > File "/Applications/RoastLogger.app/Contents/Resources/__boot__.py", line > 2, in _chdir_resource > import os > zipimport.ZipImportError: can't decompress data; zlib not available > > ...which is identical to the first issue in this thread: > > http://mail.python.org/pipermail/pythonmac-sig/2010-September/022629.html > > zlib is present also: > > find . -name 'zlib*' > ./Resources/lib/python2.6/lib-dynload/zlib.so > > I'm using 2.6.6 MacPython, Py2app 0.6.4, altgraph/modulegraph 0.9 and > macholib==1.4.1. > > Are issues being accepted on the bitbucket page? I'd be happy to > contribute in any way. > > BZ > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at acm.org Thu Jun 23 05:15:12 2011 From: nad at acm.org (Ned Deily) Date: Wed, 22 Jun 2011 20:15:12 -0700 Subject: [Pythonmac-SIG] Py2app zlib import error References: Message-ID: In article , Brian Zambrano wrote: > Just bumping this. Does anyone have solution or some advice on how to > proceed? You might be able to provide more insight by running the following commands on the zlib extension module: ls -l ./Resources/lib/python2.6/lib-dynload/zlib.so file ./Resources/lib/python2.6/lib-dynload/zlib.so otool -L ./Resources/lib/python2.6/lib-dynload/zlib.so and stating exactly which py2app options you are using to build the app. -- Ned Deily, nad at acm.org From brianz at gmail.com Thu Jun 23 09:29:17 2011 From: brianz at gmail.com (Brian Zambrano) Date: Thu, 23 Jun 2011 00:29:17 -0700 Subject: [Pythonmac-SIG] Py2app zlib import error In-Reply-To: References: Message-ID: > ls -l ./Resources/lib/python2.6/lib-dynload/zlib.so -rw-r--r-- 1 brianz staff 195256 Jun 23 00:09 ./Resources/lib/python2.6/lib-dynload/zlib.so > file ./Resources/lib/python2.6/lib-dynload/zlib.so ./Resources/lib/python2.6/lib-dynload/zlib.so: Mach-O universal binary with 2 architectures ./Resources/lib/python2.6/lib-dynload/zlib.so (for architecture ppc): Mach-O bundle ppc ./Resources/lib/python2.6/lib-dynload/zlib.so (for architecture i386): Mach-O bundle i386 > otool -L ./Resources/lib/python2.6/lib-dynload/zlib.so ./Resources/lib/python2.6/lib-dynload/zlib.so (architecture ppc): /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 47.1.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.10) ./Resources/lib/python2.6/lib-dynload/zlib.so (architecture i386): /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.3.10) My py2app build args look like this. I've tried setting argv_emulation to False which had no effect: LIBSQLITE = '/Developer/Applications/Qt/plugins/sqldrivers/libqsqlite.dylib' OPTIONS = { 'argv_emulation': True, 'iconfile': os.path.join(CWD, 'resources/progicons/osx/roastlog-osx.icns'), 'strip': True, 'optimize': 2, 'includes': ['sip', 'PyQt4', 'PyQt4.QtCore', 'PyQt4.QtGui', 'PyQt4.QtNetwork', 'PyQt4.QtSql', 'simplejson', 'httplib2', 'email.iterators'], 'excludes': ['PyQt4.QtDesigner', 'PyQt4.QtOpenGL', 'PyQt4.QtScript', 'PyQt4.QtTest', 'PyQt4.QtWebKit', 'PyQt4.QtXml', 'PyQt4.phonon', 'wx'], 'frameworks': [LIBSQLITE], } BZ On Wed, Jun 22, 2011 at 8:15 PM, Ned Deily wrote: > > You might be able to provide more insight by running the following > commands on the zlib extension module: > > ls -l ./Resources/lib/python2.6/lib-dynload/zlib.so > file ./Resources/lib/python2.6/lib-dynload/zlib.so > otool -L ./Resources/lib/python2.6/lib-dynload/zlib.so > > and stating exactly which py2app options you are using to build the app. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From brianz at gmail.com Thu Jun 23 18:18:18 2011 From: brianz at gmail.com (Brian Zambrano) Date: Thu, 23 Jun 2011 09:18:18 -0700 Subject: [Pythonmac-SIG] Py2app zlib import error In-Reply-To: <4E036401.2090700@noaa.gov> References: <4E036401.2090700@noaa.gov> Message-ID: It smells of a py2app issue to me as well...something with the path settings. I don't have macports installed on this machine, so that's definitely not it. The exact same error happens when doing a hello world program with py2app. The setup file, unaltered: """ This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup APP = ['testpy2app.py'] DATA_FILES = [] OPTIONS = {'argv_emulation': True} setup( app=APP, data_files=DATA_FILES, options={'py2app': OPTIONS}, setup_requires=['py2app'], ) Launching the compiled app throws the same zlib error. I guess I'll need to start digging through py2app source and figure out where this bug is coming from. BZ On Thu, Jun 23, 2011 at 9:04 AM, Chris Barker wrote: > On 6/22/11 7:30 PM, Brian Zambrano wrote: > >> Just bumping this. Does anyone have solution or some advice on how to >> proceed? >> > > The error is: >> >> 'import site' failed; use -v for traceback >> > ... > > zipimport.ZipImportError: can't decompress data; zlib not available >> > > This looks like it has nothing to do with PyQT or anything else, actually, > but is a raw py2app issue. So the first thing I'd do is try a really simple > example. That will make it easier for others to try and reproduce the > failure as well. > > Taking a guess, I'd say you're getting a zlib from macports that may rely > on something else in macports that other users don't have. > > Again, I"'d avoid macports for something you want to re-distribute. > > > -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.Barker at noaa.gov > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chris.Barker at noaa.gov Thu Jun 23 18:04:17 2011 From: Chris.Barker at noaa.gov (Chris Barker) Date: Thu, 23 Jun 2011 09:04:17 -0700 Subject: [Pythonmac-SIG] Py2app zlib import error In-Reply-To: References: Message-ID: <4E036401.2090700@noaa.gov> On 6/22/11 7:30 PM, Brian Zambrano wrote: > Just bumping this. Does anyone have solution or some advice on how to > proceed? > The error is: > > 'import site' failed; use -v for traceback ... > zipimport.ZipImportError: can't decompress data; zlib not available This looks like it has nothing to do with PyQT or anything else, actually, but is a raw py2app issue. So the first thing I'd do is try a really simple example. That will make it easier for others to try and reproduce the failure as well. Taking a guess, I'd say you're getting a zlib from macports that may rely on something else in macports that other users don't have. Again, I"'d avoid macports for something you want to re-distribute. -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.Barker at noaa.gov From nad at acm.org Thu Jun 23 22:20:16 2011 From: nad at acm.org (Ned Deily) Date: Thu, 23 Jun 2011 13:20:16 -0700 Subject: [Pythonmac-SIG] Py2app zlib import error References: Message-ID: In article , Brian Zambrano wrote: > > ls -l ./Resources/lib/python2.6/lib-dynload/zlib.so [...] Sorry, nothing obviously wrong there. So presumably it is some sort of path issue in the py2app bootstrap. Hope you track it down. -- Ned Deily, nad at acm.org From john_owens at yahoo.com Sun Jun 26 02:07:20 2011 From: john_owens at yahoo.com (John Owens) Date: Sat, 25 Jun 2011 17:07:20 -0700 Subject: [Pythonmac-SIG] ASTranslate (appscript) has a runtime error (variable not defined) on what I think is valid appscript Message-ID: <2B367A9F0D8C4AC0A4F5E65F3D872873@yahoo.com> Would love a little help solving this! I guess this is a bug report, but I don't know how else to contact the ASTranslate developers. I'd like to hear how to translate this AppleScript to appscript properly. Details at the following link, also copied below: http://stackoverflow.com/questions/6475872/astranslate-appscript-has-a-runtime-error-variable-not-defined-on-what-i-thin Here's the AppleScript (first snippet): http://dinhviethoa.tumblr.com/post/5967294192/applescript-with-sparrow tell application "Sparrow" activate set theMessage to make new outgoing message with properties {subject:"meeting at 4:00", content:"We'll be 4 to discuss about the future of our life."} tell theMessage make new to recipient at end of to recipients with properties {name:"John Doe", address:"john at gmail.com"} make new to recipient at end of cc recipients with properties {name:"Sonia Jones", address:"sonia at gmail.com"} sendmessage end tell end tell ASTranslate reveals: app(u'Sparrow').activate() app(u'Sparrow').make(new=k.outgoing_message, with_properties={k.content: u"We'll be 4 to discuss about the future of our life.", k.subject: u'meeting at 4:00'}) Runtime Error: The variable theMessage is not defined. (-2753) What I was trying (that crashed Sparrow hard): sparrow = app('Sparrow') sparrow.activate() sparrow.help() msg = sparrow.make(new=k.outgoing_message, with_properties={k.subject:"Foo", k.content:"Bar"}) msg.make(new=k.to_recipient, at=msg.to_recipients.end, with_properties={k.name:"foo at bar.com"}) msg.sendmessage() Any help appreciated, thanks. JDO From ronaldoussoren at mac.com Tue Jun 28 14:10:43 2011 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 28 Jun 2011 14:10:43 +0200 Subject: [Pythonmac-SIG] Py2app zlib import error In-Reply-To: References: Message-ID: <6BC3044B-FFF2-4E45-815B-53B303D4F5E9@mac.com> On 21 Jun, 2011, at 7:47, Brian Zambrano wrote: > I have a PyQt app which I've been compiling successfully for over a year on OS X 10.5. I've recently upgraded to a new system running 10.6, and my py2app builds are failing to boot after compilation. After some poking around, it looks like there are many other folks with the same issues, but I haven't found a solution yet. > > The error is: > > 'import site' failed; use -v for traceback > Traceback (most recent call last): > File "/Applications/RoastLogger.app/Contents/Resources/__boot__.py", line 4, in > _chdir_resource() > File "/Applications/RoastLogger.app/Contents/Resources/__boot__.py", line 2, in _chdir_resource > import os > zipimport.ZipImportError: can't decompress data; zlib not available > > ...which is identical to the first issue in this thread: > > http://mail.python.org/pipermail/pythonmac-sig/2010-September/022629.html > > zlib is present also: > > find . -name 'zlib*' > ./Resources/lib/python2.6/lib-dynload/zlib.so > > I'm using 2.6.6 MacPython, Py2app 0.6.4, altgraph/modulegraph 0.9 and macholib==1.4.1. That's odd, this combination should work. > > Are issues being accepted on the bitbucket page? I'd be happy to contribute in any way. Yes. I'm using bitbucket to track bugs and feature request, and patches for bugfixes are always welcome. Ronald > > BZ > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronaldoussoren at mac.com Tue Jun 28 14:08:29 2011 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 28 Jun 2011 14:08:29 +0200 Subject: [Pythonmac-SIG] [py2app] optimize and includes In-Reply-To: References: Message-ID: <0BE4B1EF-2793-4D02-A28C-BF29694F2B94@mac.com> On 18 Jun, 2011, at 16:38, Jeffrey O'Neill wrote: > I'm using the latest py2app. > > Since my app uses __import__ to load some modules, I list those modules in the include option. > > This works great when optimization is turned off, but when I turn optimization on (1 or 2), the modules listed in the includes option go missing. > > Is there a fix for this? This should be fixed in the repository. That said, the repository is not in an optimal state right now: I've done some small changes to the C code of the executable stubs to fix another issue and because I'm currently running Xcode 4 on my machine I cannot rebuild the executable stubs for the normal 32-bit build of python (Xcode 4 doesn't support PPC code). Ronald > > _________________________________________________________ > OpenSTV -- Software for ranked-choice and preferential voting systems > http://www.OpenSTV.org > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff.oneill at openstv.org Tue Jun 28 15:18:15 2011 From: jeff.oneill at openstv.org (Jeffrey O'Neill) Date: Tue, 28 Jun 2011 09:18:15 -0400 Subject: [Pythonmac-SIG] [py2app] optimize and includes In-Reply-To: <0BE4B1EF-2793-4D02-A28C-BF29694F2B94@mac.com> References: <0BE4B1EF-2793-4D02-A28C-BF29694F2B94@mac.com> Message-ID: Thanks for fixing this. If it matters, I need 32-bit only code to support older versions of OS X but I don't need to support PPC (shouldn't be too many of those around anymore...). On Tue, Jun 28, 2011 at 8:08 AM, Ronald Oussoren wrote: > > On 18 Jun, 2011, at 16:38, Jeffrey O'Neill wrote: > > I'm using the latest py2app. > > Since my app uses __import__ to load some modules, I list those modules in > the include option. > > This works great when optimization is turned off, but when I turn > optimization on (1 or 2), the modules listed in the includes option go > missing. > > Is there a fix for this? > > > This should be fixed in the repository. That said, the repository is not > in an optimal state right now: I've done some small changes to the C code of > the executable stubs to fix another issue and because I'm currently running > Xcode 4 on my machine I cannot rebuild the executable stubs for the normal > 32-bit build of python (Xcode 4 doesn't support PPC code). > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronaldoussoren at mac.com Tue Jun 28 14:20:57 2011 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 28 Jun 2011 14:20:57 +0200 Subject: [Pythonmac-SIG] Py2app zlib import error In-Reply-To: References: <4E036401.2090700@noaa.gov> Message-ID: <39DE0D1B-9A3A-4076-AFE5-D8381D37C9C8@mac.com> On 23 Jun, 2011, at 18:18, Brian Zambrano wrote: > It smells of a py2app issue to me as well...something with the path settings. Something else to try: there is an __boot__.py inside the generated application bundle. Add the following line to the top of that file: import sys; print (sys.path) Then launch the application from the command-line: dist/test2pyapp.app/Contents/MacOS/testpy2app This should print the value of Python's search path in the terminal. The entries of that list should refer to ".../Resources/lib/python2.6", ".../Resources/lib/python2.6/lib-dynload" and ".../Resources/lib/python2.6/site-packages.zip". Given your problem sys.path either doesn't contain the lib-dynload entry, or the lib-dynload entry is after the entry for site-packages.zip. Both of which would be bugs in py2app. As a quick workaround it should be possible monkeypatch sys.path in __boot__.py, that way you can at least launch the application while we look for a proper solution. Ronald > > I don't have macports installed on this machine, so that's definitely not it. > > The exact same error happens when doing a hello world program with py2app. The setup file, unaltered: > > """ > This is a setup.py script generated by py2applet > > Usage: > python setup.py py2app > """ > > from setuptools import setup > > APP = ['testpy2app.py'] > DATA_FILES = [] > OPTIONS = {'argv_emulation': True} > > setup( > app=APP, > data_files=DATA_FILES, > options={'py2app': OPTIONS}, > setup_requires=['py2app'], > ) > > Launching the compiled app throws the same zlib error. I guess I'll need to start digging through py2app source and figure out where this bug is coming from. > > BZ > > > On Thu, Jun 23, 2011 at 9:04 AM, Chris Barker wrote: > On 6/22/11 7:30 PM, Brian Zambrano wrote: > Just bumping this. Does anyone have solution or some advice on how to > proceed? > > The error is: > > 'import site' failed; use -v for traceback > ... > > zipimport.ZipImportError: can't decompress data; zlib not available > > This looks like it has nothing to do with PyQT or anything else, actually, but is a raw py2app issue. So the first thing I'd do is try a really simple example. That will make it easier for others to try and reproduce the failure as well. > > Taking a guess, I'd say you're getting a zlib from macports that may rely on something else in macports that other users don't have. > > Again, I"'d avoid macports for something you want to re-distribute. > > > -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.Barker at noaa.gov > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG -------------- next part -------------- An HTML attachment was scrubbed... URL: From ronaldoussoren at mac.com Tue Jun 28 15:37:39 2011 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 28 Jun 2011 15:37:39 +0200 Subject: [Pythonmac-SIG] [py2app] optimize and includes In-Reply-To: References: <0BE4B1EF-2793-4D02-A28C-BF29694F2B94@mac.com> Message-ID: <64924398-4830-4156-83F7-C068B31E8514@mac.com> On 28 Jun, 2011, at 15:18, Jeffrey O'Neill wrote: > Thanks for fixing this. > > If it matters, I need 32-bit only code to support older versions of OS X but I don't need to support PPC (shouldn't be too many of those around anymore...). If your python was build using '--with-universal-archs=intel' the version in the repository should work fine (and likewise for 64-bit only builds). Other build variants should result in an automatic rebuild of the executable stubs, but I've noticed in the past that this doesn't always work as designed. Ronald > > On Tue, Jun 28, 2011 at 8:08 AM, Ronald Oussoren wrote: > > On 18 Jun, 2011, at 16:38, Jeffrey O'Neill wrote: > >> I'm using the latest py2app. >> >> Since my app uses __import__ to load some modules, I list those modules in the include option. >> >> This works great when optimization is turned off, but when I turn optimization on (1 or 2), the modules listed in the includes option go missing. >> >> Is there a fix for this? > > This should be fixed in the repository. That said, the repository is not in an optimal state right now: I've done some small changes to the C code of the executable stubs to fix another issue and because I'm currently running Xcode 4 on my machine I cannot rebuild the executable stubs for the normal 32-bit build of python (Xcode 4 doesn't support PPC code). > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfgrcar at comcast.net Thu Jun 23 20:35:58 2011 From: jfgrcar at comcast.net (Joseph Grcar) Date: Thu, 23 Jun 2011 11:35:58 -0700 Subject: [Pythonmac-SIG] python characters on a mac? Message-ID: Hello, I was directed to send the following query to this email address. I am using Python 2.5.1 (r251:54863, Dec 16 2010, 14:12:43) on mac OS 1.5. How does one set up the character manipulation in python to avoid mangling foreign-language characters (i.e., French accents, German umlauts, etc.)? For example, I have a text file example.txt. The unix command cat displays the contents as the single line: S?o Paulo However, if I read this file in a python script and then write it back out character by character using the python script #!/usr/bin/python input=open("example.txt","r") output=open("out.txt","w") for line in input: for i in range (len (line)): output.write ("%s\n" % line[i]) then the characters in the file are given as S ? ? o P a u l o Why does python does not make use of the character codes that are used by the Mac OS? Is there a way to tell python to recognize the OS character set? Many thanks, -- Joe Joseph Grcar 6059 Castlebrook Drive Castro Valley, CA 94552 USA email jfgrcar at comcast.net phone 1-510-581-1353 From karstenwo at googlemail.com Wed Jun 29 11:40:17 2011 From: karstenwo at googlemail.com (Karsten Wolf) Date: Wed, 29 Jun 2011 11:40:17 +0200 Subject: [Pythonmac-SIG] python characters on a mac? In-Reply-To: References: Message-ID: <24BFA3DB-1F26-48E2-B349-7BF4CE8901B5@googlemail.com> > I was directed to send the following query to this email address. That's too bad. If you're not here on your own you might be reluctant to learn... Try this. Assuming your text file was encoded in UTF-8. Read the docs about unicode and encoding. Am 23.06.2011 um 20:35 schrieb Joseph Grcar: > #!/usr/bin/python > input=open("example.txt","r") > output=open("out.txt","w") > for line in input: # convert string to unicode. Given that your output contained 2 ? for ? # my guess is UTF-8 line = unicode(line, "UTF-8") for character in line: output.write ("%s\n" % character) > Why does python does not make use of the character codes that are > used by the Mac OS? Is there a way to tell python to recognize the > OS character set? Because it can't. There is no way to know which encoding a file is in. -karsten From Chris.Barker at noaa.gov Wed Jun 29 17:30:06 2011 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 29 Jun 2011 08:30:06 -0700 Subject: [Pythonmac-SIG] python characters on a mac? In-Reply-To: <24BFA3DB-1F26-48E2-B349-7BF4CE8901B5@googlemail.com> References: <24BFA3DB-1F26-48E2-B349-7BF4CE8901B5@googlemail.com> Message-ID: <4E0B44FE.2020707@noaa.gov> Karsten Wolf wrote: > Try this. Assuming your text file was encoded in UTF-8. Read the docs > about unicode and encoding. exactly. Read this: http://www.joelonsoftware.com/articles/Unicode.html and then this: http://boodebr.org/main/python/all-about-python-and-unicode -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.Barker at noaa.gov From amorris at mistermorris.com Thu Jun 30 13:52:04 2011 From: amorris at mistermorris.com (Adam Morris) Date: Thu, 30 Jun 2011 18:52:04 +0700 Subject: [Pythonmac-SIG] translate applescript to appscript Message-ID: I have an AppleScript snippet that I need translating to python appscript; too low-level for ASTranslate to handle: tell application "Finder" "/Users/brainysmurf/Desktop" as POSIX file as alias end tell I'm writing a wrapper class for the Finder and want to be able to pass /path/to/doc to its methods and so I need a way to convert from paths to file objects that the Finder can do things with. Reading the docs I tried: appscript.app("Finder").AS_newreference(appscript.app.elements('psxf').byname('/Users/brainysmurf/Desktop')) But I get an error saying that elements is not an attribute. I get the same deal with appscript.app('Finder'). Using appscript 1.0.0 Help? -Adam From hraban at fiee.net Thu Jun 30 15:01:48 2011 From: hraban at fiee.net (Henning Hraban Ramm) Date: Thu, 30 Jun 2011 15:01:48 +0200 Subject: [Pythonmac-SIG] translate applescript to appscript In-Reply-To: References: Message-ID: <96D0A0F9-26F3-43F8-8621-F595FC8CCEA1@fiee.net> Am 2011-06-30 um 13:52 schrieb Adam Morris: > I have an AppleScript snippet that I need translating to python > appscript; too low-level for ASTranslate to handle: > > tell application "Finder" > "/Users/brainysmurf/Desktop" as POSIX file as alias > end tell mactypes.Alias(unicodedata.normalize('NFD', os.path.abspath(path))) You don't need the unicodedata stuff if your paths are 7-bit ASCII only. Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) From amorris at mistermorris.com Thu Jun 30 15:59:59 2011 From: amorris at mistermorris.com (Adam Morris) Date: Thu, 30 Jun 2011 20:59:59 +0700 Subject: [Pythonmac-SIG] translate applescript to appscript In-Reply-To: <96D0A0F9-26F3-43F8-8621-F595FC8CCEA1@fiee.net> References: <96D0A0F9-26F3-43F8-8621-F595FC8CCEA1@fiee.net> Message-ID: > mactypes.Alias(unicodedata.normalize('NFD', os.path.abspath(path))) I want the result to respond to the Finder's dictionary, though, so wouldn't I need the Finder to wrap it rather than from the mactypes module? comment.get() on the resulting object doesn't work.