由于未捕获的异常“ NSInternalInconsistencyException”而导致的Python终止应用程序,原因:“未在AppKit(主)线程上运行”

时间:2018-11-13 07:59:53

标签: python opencv

我正在使用此URL的示例代码测试Tello无人机 https://qiita.com/mozzio369/items/8e0fb12dc30c493f5cc4

我尝试使用自制软件和pip重新安装opencv

brew install opencv
pip install opencv

,但是两个输出是相同的。 有谁知道解决方案吗?

最好的问候,

输出日志:

python drone.py 
2018-11-13 16:38:58.623 python[31113:120557] !!! BUG: The current event queue and the main event queue are not the same. Events will not be handled correctly. This is probably because _TSGetMainThread was called for the first time off the main thread.
2018-11-13 16:38:58.627 python[31113:120557] pid(31113)/euid(0) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2018-11-13 16:38:58.627 python[31113:120557] pid(31113)/euid(0) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2018-11-13 16:38:58.627 python[31113:120557] pid(31113)/euid(0) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2018-11-13 16:38:58.627 python[31113:120557] pid(31113)/euid(0) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2018-11-13 16:38:58.627 python[31113:120557] pid(31113)/euid(0) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2018-11-13 16:38:58.627 python[31113:120557] pid(31113)/euid(0) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2018-11-13 16:38:58.627 python[31113:120557] pid(31113)/euid(0) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2018-11-13 16:38:58.627 python[31113:120557] pid(31113)/euid(0) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2018-11-13 16:38:58.627 python[31113:120557] pid(31113)/euid(0) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2018-11-13 16:38:58.627 python[31113:120557] pid(31113)/euid(0) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2018-11-13 16:38:58.627 python[31113:120557] pid(31113)/euid(0) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2018-11-13 16:38:58.627 python[31113:120557] pid(31113)/euid(0) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
2018-11-13 16:38:58.693 python[31113:120557] *** Assertion failure in void assertRunningOnAppKitThread(void)(), /BuildRoot/Library/Caches/com.apple.xbs/Sources/ViewBridge/ViewBridge-401.1/ViewBridgeUtilities.m:912
2018-11-13 16:38:58.706 python[31113:120557] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'not running on AppKit (main) thread'
*** First throw call stack:
(
0   CoreFoundation                      0x00007fff49ea7e65 __exceptionPreprocess + 256
1   libobjc.A.dylib                     0x00007fff75f03720 objc_exception_throw + 48
2   CoreFoundation                      0x00007fff49ec2ab2 +[NSException raise:format:arguments:] + 98
3   Foundation                          0x00007fff4c2b5dfd -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4   ViewBridge                          0x00007fff72fca8ea __26+[NSRemoteView initialize]_block_invoke + 15
5   libdispatch.dylib                   0x00007fff76f82d53 _dispatch_call_block_and_release + 12
6   libdispatch.dylib                   0x00007fff76f83dcf _dispatch_client_callout + 8
7   libdispatch.dylib                   0x00007fff76f8ef63 _dispatch_main_queue_callback_4CF + Abort trap: 6    

0 个答案:

没有答案