1

Python の Mac OS 10.11 では、次の操作を行うと中止トラップが発生します。

from moviepy.editor import *
from Tkinter import *
root = Tk()

アボート トラップは次のようになります。

2016-01-27 16:01:24.723 Python[13070:104308] -[NSApplication _setup:]: unrecognized selector sent to instance 0x7ffa632d9bd0
2016-01-27 16:01:24.724 Python[13070:104308] An uncaught exception was raised
2016-01-27 16:01:24.724 Python[13070:104308] -[NSApplication _setup:]: unrecognized selector sent to instance 0x7ffa632d9bd0
2016-01-27 16:01:24.724 Python[13070:104308] (
    0   CoreFoundation                      0x00007fff933e4ae2 __exceptionPreprocess + 178
    1   libobjc.A.dylib                     0x00007fff92bdb73c objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff933e7b9d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
    3   CoreFoundation                      0x00007fff93320601 ___forwarding___ + 1009
    4   CoreFoundation                      0x00007fff93320188 _CF_forwarding_prep_0 + 120
    5   Tk                                  0x0000000110f42958 TkpInit + 476
    6   Tk                                  0x0000000110ebda7e Tk_Init + 1799
    7   _tkinter.so                         0x000000010cdb8b9d Tcl_AppInit + 82
    8   _tkinter.so                         0x000000010cdb8547 Tkinter_Create + 1120
    9   Python                              0x0000000108de7bcd PyEval_EvalFrameEx + 26858
    10  Python                              0x0000000108de10f1 PyEval_EvalCodeEx + 1583
    11  Python                              0x0000000108d85fb1 function_call + 352
    12  Python                              0x0000000108d67eb0 PyObject_Call + 99
    13  Python                              0x0000000108d72cb8 instancemethod_call + 173
    14  Python                              0x0000000108d67eb0 PyObject_Call + 99
    15  Python                              0x0000000108deb06f PyEval_CallObjectWithKeywords + 165
    16  Python                              0x0000000108d70f5c PyInstance_New + 126
    17  Python                              0x0000000108d67eb0 PyObject_Call + 99
    18  Python                              0x0000000108de7a27 PyEval_EvalFrameEx + 26436
    19  Python                              0x0000000108de10f1 PyEval_EvalCodeEx + 1583
    20  Python                              0x0000000108de0abc PyEval_EvalCode + 54
    21  Python                              0x0000000108e04ea1 run_mod + 53
    22  Python                              0x0000000108e04ccc PyRun_InteractiveOneFlags + 377
    23  Python                              0x0000000108e047c5 PyRun_InteractiveLoopFlags + 192
    24  Python                              0x0000000108e0466f PyRun_AnyFileExFlags + 60
    25  Python                              0x0000000108e16445 Py_Main + 3137
    26  libdyld.dylib                       0x00007fff916435ad start + 1
    27  ???                                 0x0000000000000001 0x0 + 1
)
2016-01-27 16:01:24.725 Python[13070:104308] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSApplication _setup:]: unrecognized selector sent to instance 0x7ffa632d9bd0'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff933e4ae2 __exceptionPreprocess + 178
    1   libobjc.A.dylib                     0x00007fff92bdb73c objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff933e7b9d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
    3   CoreFoundation                      0x00007fff93320601 ___forwarding___ + 1009
    4   CoreFoundation                      0x00007fff93320188 _CF_forwarding_prep_0 + 120
    5   Tk                                  0x0000000110f42958 TkpInit + 476
    6   Tk                                  0x0000000110ebda7e Tk_Init + 1799
    7   _tkinter.so                         0x000000010cdb8b9d Tcl_AppInit + 82
    8   _tkinter.so                         0x000000010cdb8547 Tkinter_Create + 1120
    9   Python                              0x0000000108de7bcd PyEval_EvalFrameEx + 26858
    10  Python                              0x0000000108de10f1 PyEval_EvalCodeEx + 1583
    11  Python                              0x0000000108d85fb1 function_call + 352
    12  Python                              0x0000000108d67eb0 PyObject_Call + 99
    13  Python                              0x0000000108d72cb8 instancemethod_call + 173
    14  Python                              0x0000000108d67eb0 PyObject_Call + 99
    15  Python                              0x0000000108deb06f PyEval_CallObjectWithKeywords + 165
    16  Python                              0x0000000108d70f5c PyInstance_New + 126
    17  Python                              0x0000000108d67eb0 PyObject_Call + 99
    18  Python                              0x0000000108de7a27 PyEval_EvalFrameEx + 26436
    19  Python                              0x0000000108de10f1 PyEval_EvalCodeEx + 1583
    20  Python                              0x0000000108de0abc PyEval_EvalCode + 54
    21  Python                              0x0000000108e04ea1 run_mod + 53
    22  Python                              0x0000000108e04ccc PyRun_InteractiveOneFlags + 377
    23  Python                              0x0000000108e047c5 PyRun_InteractiveLoopFlags + 192
    24  Python                              0x0000000108e0466f PyRun_AnyFileExFlags + 60
    25  Python                              0x0000000108e16445 Py_Main + 3137
    26  libdyld.dylib                       0x00007fff916435ad start + 1
    27  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

moviepy は最新バージョン (0.2.2.11) で、Tkinter は Tcl/Tk Web サイトからの推奨ビルドです。また、moviepy.editor をインポートすると、Tk() オブジェクトが moviepy によってインスタンス化されているかのように、Tkinter シンボルがドックにポップアップすることにも気付きました。非常に奇妙で、非常にイライラします。

4

1 に答える 1