Unrecognized selector error when NOT importing mayavi
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 316
- Avg merge
- 7h 44m
- Merged PRs (30d)
- 5
Description
Hello!
I run python 3.5.0 with Tk 8.5 in a virtual conda environment on my mac to be able to use mayavi. I recently realized however, that I can't do simple plots from matplotlib (2.1.1) in this environment.
The code
```
from mayavi import mlab
import matplotlib.pyplot as plt
plt.plot([1,2,3])
plt.show()
```
runs just fine, but takes over **5s** to execute. However, as soon as I remove the mlab import, the exact same code spits out the following error:
> 2017-12-21 04:20:22.669 python[14737:6910210] -[TKWindow setCanCycle:]: unrecognized selector sent to instance 0x10e436090
> 2017-12-21 04:20:22.672 python[14737:6910210] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[TKWindow setCanCycle:]: unrecognized selector sent to instance 0x10e436090'
> *** First throw call stack:
> (
> 0 CoreFoundation 0x000000010010e2fb __exceptionPreprocess + 171
> 1 libobjc.A.dylib 0x0000000100dbdc76 objc_exception_throw + 48
> 2 CoreFoundation 0x00000001001a6da4 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
> 3 CoreFoundation 0x0000000100084670 ___forwarding___ + 1456
> 4 CoreFoundation 0x0000000100084038 _CF_forwarding_prep_0 + 120
> 5 libtk8.5.dylib 0x000000010e77ff9f ApplyWindowAttributeFlagChanges + 1124
> 6 libtk8.5.dylib 0x000000010e780aa8 TkMacOSXApplyWindowAttributes + 51
> 7 libtk8.5.dylib 0x000000010e780f86 TkMacOSXMakeRealWindowExist + 1189
> 8 libtk8.5.dylib 0x000000010e78112a TkWmMapWindow + 52
> 9 libtk8.5.dylib 0x000000010e6ea918 Tk_MapWindow + 65
> 10 libtk8.5.dylib 0x000000010e6f3469 MapFrame + 62
> 11 libtcl8.5.dylib 0x000000010e650178 TclServiceIdle + 76
> 12 libtcl8.5.dylib 0x000000010e635491 Tcl_DoOneEvent + 329
> 13 libtk8.5.dylib 0x000000010e6ca72d Tk_UpdateObjCmd + 172
> 14 libtcl8.5.dylib 0x000000010e5cda47 TclEvalObjvInternal + 773
> 15 libtcl8.5.dylib 0x000000010e5ceaa5 Tcl_EvalObjv + 66
> 16 _tkinter.cpython-35m-darwin.so 0x000000010e3f2bed Tkapp_Call + 189
> 17 libpython3.5m.dylib 0x00000001007b8179 PyCFunction_Call + 233
> 18 libpython3.5m.dylib 0x0000000100843fbd PyEval_EvalFrameEx + 32029
> 19 libpython3.5m.dylib 0x0000000100845053 PyEval_EvalFrameEx + 36275
> 20 libpython3.5m.dylib 0x0000000100845df0 _PyEval_EvalCodeWithName + 2400
> 21 libpython3.5m.dylib 0x0000000100844d26 PyEval_EvalFrameEx + 35462
> 22 libpython3.5m.dylib 0x0000000100845df0 _PyEval_EvalCodeWithName + 2400
> 23 libpython3.5m.dylib 0x0000000100845ef7 PyEval_EvalCodeEx + 71
> 24 libpython3.5m.dylib 0x0000000100792d2a function_call + 186
> 25 libpython3.5m.dylib 0x000000010075e783 PyObject_Call + 99
> 26 libpython3.5m.dylib 0x0000000100840f0b PyEval_EvalFrameEx + 19563
> 27 libpython3.5m.dylib 0x0000000100845df0 _PyEval_EvalCodeWithName + 2400
> 28 libpython3.5m.dylib 0x0000000100844d26 PyEval_EvalFrameEx + 35462
> 29 libpython3.5m.dylib 0x0000000100845df0 _PyEval_EvalCodeWithName + 2400
> 30 libpython3.5m.dylib 0x0000000100845f51 PyEval_EvalCode + 81
> 31 libpython3.5m.dylib 0x0000000100875487 PyRun_StringFlags + 183
> 32 libpython3.5m.dylib 0x0000000100875511 PyRun_SimpleStringFlags + 65
> 33 libpython3.5m.dylib 0x000000010088d06c Py_Main + 1580
> 34 python 0x0000000100000e92 main + 418
> 35 python 0x0000000100000cc4 start + 52
> 36 ??? 0x0000000000000004 0x0 + 4
> )
> libc++abi.dylib: terminating with uncaught exception of type NSException
Is this a problem with my TK install or what exactly is going on? Is there any workaround?
I tried different versions of TK and matplotlib without success.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.