I'm working on some kivy code that's working fine on windows 10, but crashes on osx sierra, I've isolated that the crash happens when I import kivy.core.window along side matplotlib:
import matplotlib
matplotlib.use("TkAgg")
from matplotlib import pyplot as plt
import kivy.core.window
It also crashes without matplotlib.use("TkAgg")
. This is just included to show that the issue isn`t fixed by this as other questions suggest.
The output from the exception is:
2017-03-08 13:33:32.461 Python[28614:209475] -[SDLApplication _setup:]: unrecognized selector sent to instance 0x1020ea6c0
2017-03-08 13:33:32.464 Python[28614:209475] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SDLApplication _setup:]: unrecognized selector sent to instance 0x1020ea6c0'
*** First throw call stack:
(
0 CoreFoundation 0x00007fffa8716e7b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fffbd300cad objc_exception_throw + 48
...
)
libc++abi.dylib: terminating with uncaught exception of type NSException
What could be causing this, and where do I start looking to debug this type of exception it?
After solving this I ran into a perhaps related problem, noted in this question.