Anyone have any idea how to go about fixing this? Thanks, I mainly use matlab for my hyperspectral manipulation but would like to have python as an option.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What OS version are you running and what version of wxWidgets & wxPython do you have? I've never seen this before but doing a quick search, similar errors reported for other apps are usually related to OSX/Cocoa.
-thomas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
By googling " is only safe to invoke on the main thread" I found some material that shows the problem with several programs and libraries and is a Cocoa related issue.
Unfortunately I don't know how to begin trying to work around something like this.
- John
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am running a slightly older version of wx (2.8.10, IIRC) on OS X 10.6 (with all relevant packages also installed via MacPorts) and I do not get this error. But, as you suggested, I believe this is probably a problem related to Cocoa since other graphics libraries (e.g., Qt), are reporting the same problem.
If you don't mind running python 2.6 (it can coexist under MacPorts with 2.7), you can probably get around this problem. The py26-wxpython MacPorts package has a gtk variant, which worked for me when I had problems running wx with carbon/cocoa.
-thomas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I try to view using view() I get this error:
Initializing graphics handlers…
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/spectral/graphics/spywxpythonthread.py:145: wxPyDeprecationWarning: Call to deprecated item 'InitAllImageHandlers'.
wx.InitAllImageHandlers()
2012-02-09 14:49:21.582 Python *** Assertion failure in +, /SourceCache/Foundation/Foundation-833.20/Misc.subproj/NSUndoManager.m:324
2012-02-09 14:49:21.583 Python + is only safe to invoke on the main thread.
2012-02-09 14:49:21.586 Python (
0 CoreFoundation 0x00007fff84552286 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff8516ad5e objc_exception_throw + 43
2 CoreFoundation 0x00007fff845520ba + + 106
3 Foundation 0x00007fff884b77d3 - + 169
4 Foundation 0x00007fff88426a33 + + 144
5 AppKit 0x00007fff88a5a6ab - + 596
6 libwx_osx_cocoau-2.9.3.0.0.dylib 0x0000000109865343 _ZN14wxGUIEventLoop5DoRunEv + 51
7 libwx_osx_cocoau-2.9.3.0.0.dylib 0x0000000109727b87 _ZN13wxCFEventLoop3RunEv + 55
8 libwx_osx_cocoau-2.9.3.0.0.dylib 0x00000001095e0718 _ZN16wxAppConsoleBase8MainLoopEv + 72
9 _core_.so 0x00000001092ce9bc _ZN7wxPyApp8MainLoopEv + 76
10 _core_.so 0x000000010931c31f _wrap_PyApp_MainLoop + 79
11 Python 0x0000000108d02bfa PyEval_EvalFrameEx + 9706
12 Python 0x0000000108d005b9 PyEval_EvalCodeEx + 2201
13 Python 0x0000000108c9388e function_call + 350
14 Python 0x0000000108c6efd1 PyObject_Call + 97
15 Python 0x0000000108c7aff6 instancemethod_call + 470
16 Python 0x0000000108c6efd1 PyObject_Call + 97
17 Python 0x0000000108d024cf PyEval_EvalFrameEx + 7871
18 Python 0x0000000108d08343 fast_function + 195
19 Python 0x0000000108d022be PyEval_EvalFrameEx + 7342
20 Python 0x0000000108d005b9 PyEval_EvalCodeEx + 2201
21 Python 0x0000000108c9388e function_call + 350
22 Python 0x0000000108c6efd1 PyObject_Call + 97
23 Python 0x0000000108c7aff6 instancemethod_call + 470
24 Python 0x0000000108c6efd1 PyObject_Call + 97
25 Python 0x0000000108d07b01 PyEval_CallObjectWithKeywords + 177
26 Python 0x0000000108d3da22 t_bootstrap + 66
27 libsystem_c.dylib 0x00007fff8c4c88bf _pthread_start + 335
28 libsystem_c.dylib 0x00007fff8c4cbb75 thread_start + 13
)
2012-02-09 14:49:21.587 Python *** Assertion failure in +, /SourceCache/Foundation/Foundation-833.20/Misc.subproj/NSUndoManager.m:324
Segmentation fault: 11
Anyone have any idea how to go about fixing this? Thanks, I mainly use matlab for my hyperspectral manipulation but would like to have python as an option.
What OS version are you running and what version of wxWidgets & wxPython do you have? I've never seen this before but doing a quick search, similar errors reported for other apps are usually related to OSX/Cocoa.
-thomas
Yes, it is OSX (Lion).
I have installed:
wxWidgets @2.8.12_0
py27-wxPython @2.8.12.1_0
I used MacPorts to install all my python stuff.
-John
By googling " is only safe to invoke on the main thread" I found some material that shows the problem with several programs and libraries and is a Cocoa related issue.
Unfortunately I don't know how to begin trying to work around something like this.
- John
update:
I also attempted to use wxWidgets and wxPython 2.9.3 which created the same error.
-john
I am running a slightly older version of wx (2.8.10, IIRC) on OS X 10.6 (with all relevant packages also installed via MacPorts) and I do not get this error. But, as you suggested, I believe this is probably a problem related to Cocoa since other graphics libraries (e.g., Qt), are reporting the same problem.
If you don't mind running python 2.6 (it can coexist under MacPorts with 2.7), you can probably get around this problem. The py26-wxpython MacPorts package has a gtk variant, which worked for me when I had problems running wx with carbon/cocoa.
-thomas
well that worked. I guess i can keep checking back with wx as they update their program to see if they resolve the issue.
Thanks for the help, appreciate your patience and your work.
- John
You are welcome. Please post an update if/when you determine that it works with the python 2.7 MacPorts packages.
-thomas