Random Issues on mac os x 10.8.5
Opened this issue · 5 comments
To start with, I can't create a mac app from source. setup.py fails with argv_emulation error.
$ python2.7 setup.py py2app
running py2app
error: argv-emulation is not supported for 64-bit executables
This works fine once I disable argv_emulation (set to False in setup.py)
However the app then fails (double clicking Loxodo.app) to launch with the following error:
com.apple.launchd.peruser.11188[565] ([0x0-0x1386385].org.pythonmac.unspecified.Loxodo[32192]): Exited with code
: 255
Now the strange thing there is that, I can launch it from command line if I open Loxodo binary, which is under Contents/MacOS/Loxodo, but then the any clipboard operation fails with the following exception:
Traceback (most recent call last):
File "/Users/arbinish/dev/me/loxodo/dist/Loxodo.app/Contents/Resources/lib/python2.7/src/frontends/wx/vaultframe.py", line 562, in _on_copy_username
self._copy_to_clipboard(entry.user)
File "/Users/arbinish/dev/me/loxodo/dist/Loxodo.app/Contents/Resources/lib/python2.7/src/frontends/wx/vaultframe.py", line 284, in _copy_to_clipboard
wx.TheClipboard.SetData(clip_object)
File "/usr/local/lib/wxPython-3.0.0.0/lib/python2.7/site-packages/wx-3.0-osx_cocoa/wx/_misc.py", line 5841, in SetData
return _misc_.Clipboard_SetData(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "(syncFlags&kPasteboardClientIsOwner)" failed at /BUILD/wxPython-src-3.0.0.0/src/osx/carbon/clipbrd.cpp(121) in AddData(): client couldn't own clipboard
Any observed similar issues in their mac? Any workaround / resolution exists?
I run 10.9.2 using python from brew and wx 2.9.5 with none of the issues you describe above. I'm not sure which version of py2app I last used but 0.8 does mention an argv fix that may be related.
I don't have time now but if is helpful later I can try updating to wx 3.0 to see if I encounter any issues.
I am running wx 3.0 version, I do not see an older wx version in their homepage, http://www.wxpython.org/download.php
Looks like they aren't keeping an archive of previous release, otherwise I could have verified if it works on older version of wx. At this moment, I am not quite sure if its a problem with wx or setuptools.
Also when I click on Settings, I get the below exception
Traceback (most recent call last):
File "/Users/arbinish/dev/me/loxodo/src/frontends/wx/vaultframe.py", line 372, in _on_settings
settings = Settings(self)
File "/Users/arbinish/dev/me/loxodo/src/frontends/wx/settings.py", line 77, in __init__
self.Layout()
File "/usr/local/lib/wxPython-3.0.0.0/lib/python2.7/site-packages/wx-3.0-osx_cocoa/wx/_core.py", line 11503, in Layout
return _core_.Window_Layout(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "m_growableRows[n] < nrows" failed at /BUILD/wxPython-src-3.0.0.0/src/common/sizer.cpp(1874) in AdjustForGrowables(): invalid growable row index
Sorry it took so long but I did finally get a chance to upgrade to wx 3.0. After this I was able to run py2app with no issues and dist/Loxodo.app was created. The running open Loxodo.app
the app started up with no errors on the command ine , but there was some odd behavior.
After opening my vault the open screen went blank but the vault contents window never came up. The menu was functional and when I went to settings both the vault contents and settings windows popped up. This does not happen when I run the loxodo.py directly from the code, ie 'python loxodo.py'. I was able to copy user/passwords out fine once my vault contents was up.
Looking closer at what you said, you should probably be starting the app via open or double click in finder, digging the python out of the app is likely to have some issues. What exactly is going on beyond that I have yet to figure out.
@arbinish I believe I had these same issues and found a solution (based on some changes I see I made):
- In setup.py change argv_emulation to True (as it seems it was originally for you)
- In the installed Loxodo.app, edit Info.plist to add a key/value pair to make i386 the preferred architecture:
$ diff -u /Applications/Loxodo.app/Contents/Info.plist{~,}
--- /Applications/Loxodo.app/Contents/Info.plist~ 2012-03-28 13:39:52.000000000 -0400
+++ /Applications/Loxodo.app/Contents/Info.plist 2012-03-28 13:40:42.000000000 -0400
@@ -2,6 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
+ <key>LSArchitecturePriority</key>
+ <array>
+ <string>i386</string>
+ </array>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>