gpt4 book ai didi

python - `from QTKit import *` 在 PyObjC 应用程序中导致 'FAILED TO establish the default connection to the WindowServer'

转载 作者:太空宇宙 更新时间:2023-11-03 19:38:57 25 4
gpt4 key购买 nike

我一直在尝试 PyObjC,但似乎无法让 QTKit 导入工作。如果我像这样导入 QTKit: from QTKit import * 我会收到大量错误:

[Session started at 2009-11-13 21:03:49 -0600.]
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
2009-11-13 21:03:50.671 WhyDoesntThisWork[16550:10b] *** -[NSRecursiveLock unlock]: lock (<NSRecursiveLock: 0x1c55c00> '(null)') unlocked when not locked
2009-11-13 21:03:50.673 WhyDoesntThisWork[16550:10b] *** Break on _NSLockError() to debug.
2009-11-13 21:03:50.673 WhyDoesntThisWork[16550:10b] *** -[NSRecursiveLock unlock]: lock (<NSRecursiveLock: 0x1c55c00> '(null)') unlocked when not locked
2009-11-13 21:03:50.674 WhyDoesntThisWork[16550:10b] *** Break on _NSLockError() to debug.
2009-11-13 21:03:50.681 WhyDoesntThisWork[16550:10b] *** -[NSRecursiveLock unlock]: lock (<NSRecursiveLock: 0x1c55c00> '(null)') unlocked when not locked
2009-11-13 21:03:50.682 WhyDoesntThisWork[16550:10b] *** Break on _NSLockError() to debug.
2009-11-13 21:03:50.692 WhyDoesntThisWork[16550:10b] NSInternalInconsistencyException - Error (1002) creating CGSWindow
2009-11-13 21:03:50.704 WhyDoesntThisWork[16550:10b] *** -[NSRecursiveLock unlock]: lock (<NSRecursiveLock: 0x1c55c00> '(null)') unlocked when not locked
2009-11-13 21:03:50.705 WhyDoesntThisWork[16550:10b] *** Break on _NSLockError() to debug.
2009-11-13 21:03:50.712 WhyDoesntThisWork[16550:10b] *** -[NSRecursiveLock unlock]: lock (<NSRecursiveLock: 0x1c55c00> '(null)') unlocked when not locked
2009-11-13 21:03:50.713 WhyDoesntThisWork[16550:10b] *** Break on _NSLockError() to debug.
2009-11-13 21:03:50.721 WhyDoesntThisWork[16550:10b] *** -[NSRecursiveLock unlock]: lock (<NSRecursiveLock: 0x1c55c00> '(null)') unlocked when not locked
2009-11-13 21:03:50.721 WhyDoesntThisWork[16550:10b] *** Break on _NSLockError() to debug.
2009-11-13 21:03:50.722 WhyDoesntThisWork[16550:10b] *** -[NSRecursiveLock unlock]: lock (<NSRecursiveLock: 0x1c55c00> '(null)') unlocked when not locked
2009-11-13 21:03:50.723 WhyDoesntThisWork[16550:10b] *** Break on _NSLockError() to debug.

即使没有向应用程序添加其他代码,也会发生这种情况。例如:我可以创建一个新的 cocoa/python 项目,添加 Quicktime 框架,打开生成的委托(delegate)并添加行 from QTKit import * ,构建并运行以及错误流。我缺少一个步骤吗?

最佳答案

看看this tutorial 。显然,在建立运行循环之前,QTKit 无法导入。

关于python - `from QTKit import *` 在 PyObjC 应用程序中导致 'FAILED TO establish the default connection to the WindowServer',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1733098/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com