Python中文
首页
教程
问答
标签
搜索
登录
注册
运行python scrip时中止陷阱:6
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我正在开发一个显示动画的python程序,因此我使用pyglet。到目前为止,我一直在使用psycopy附带的python编译器,但现在我需要使这个程序尽可能独立。</p> <p>我在Windows机器上完成了这个任务,对于OSX,我遵循<a href="http://twistedpairdevelopment.wordpress.com/2012/02/21/installing-pyglet-in-mac-os-x/" rel="nofollow">this post</a>来安装pyglet。但是,当我现在运行程序时,它会返回:</p> <pre><code>>>>> python 140603_plaid8.py 2014-06-17 12:25:02.512 Python[1713:d07] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/fk/1plt8wj53_d183pv59scmg4m0000gn/T/org.python.python.savedState no input received CONFIG FILE LOADED TRIALS FILE LOADED 2014-06-17 12:25:02.661 Python[1713:d07] -[NSApplication _setup:]: unrecognized selector sent to instance 0x102d3b5c0 2014-06-17 12:25:02.662 Python[1713:d07] An uncaught exception was raised 2014-06-17 12:25:02.663 Python[1713:d07] -[NSApplication _setup:]: unrecognized selector sent to instance 0x102d3b5c0 2014-06-17 12:25:02.663 Python[1713:d07] ( 0 CoreFoundation 0x00007fff8948f25c __exceptionPreprocess + 172 1 libobjc.A.dylib 0x00007fff87f16e75 objc_exception_throw + 43 2 CoreFoundation 0x00007fff8949212d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205 3 CoreFoundation 0x00007fff893ed322 ___forwarding___ + 1010 4 CoreFoundation 0x00007fff893ecea8 _CF_forwarding_prep_0 + 120 5 Tk 0x0000000108253ed6 TkpInit + 459 6 Tk 0x00000001081d1b0f Tk_Init + 1687 7 _tkinter.so 0x00000001080b4c0d Tcl_AppInit + 77 8 _tkinter.so 0x00000001080b3657 Tkinter_Create + 919 9 Python 0x00000001000c2fad PyEval_EvalFrameEx + 21405 10 Python 0x00000001000c4fb3 PyEval_EvalCodeEx + 2115 11 Python 0x000000010003eac0 function_call + 176 12 Python 0x000000010000ceb2 PyObject_Call + 98 13 Python 0x000000010001f56d instancemethod_call + 365 14 Python 0x000000010000ceb2 PyObject_Call + 98 15 Python 0x00000001000bc957 PyEval_CallObjectWithKeywords + 87 16 Python 0x000000010002285e PyInstance_New + 126 17 Python 0x000000010000ceb2 PyObject_Call + 98 18 Python 0x00000001000c0c60 PyEval_EvalFrameEx + 12368 19 Python 0x00000001000c4fb3 PyEval_EvalCodeEx + 2115 20 Python 0x000000010003eac0 function_call + 176 21 Python 0x000000010000ceb2 PyObject_Call + 98 22 Python 0x000000010001f56d instancemethod_call + 365 23 Python 0x000000010000ceb2 PyObject_Call + 98 24 Python 0x00000001000bc957 PyEval_CallObjectWithKeywords + 87 25 Python 0x000000010002285e PyInstance_New + 126 26 Python 0x000000010000ceb2 PyObject_Call + 98 27 Python 0x00000001000c0c60 PyEval_EvalFrameEx + 12368 28 Python 0x00000001000c4fb3 PyEval_EvalCodeEx + 2115 29 Python 0x00000001000c50d6 PyEval_EvalCode + 54 30 Python 0x00000001000e995e PyRun_FileExFlags + 174 31 Python 0x00000001000e9bfa PyRun_SimpleFileExFlags + 458 32 Python 0x0000000100100c0d Py_Main + 3101 33 Python 0x0000000100000f14 Python + 3860 34 ??? 0x0000000000000002 0x0 + 2 ) 2014-06-17 12:25:02.664 Python[1713:d07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSApplication _setup:]: unrecognized selector sent to instance 0x102d3b5c0' *** First throw call stack: ( 0 CoreFoundation 0x00007fff8948f25c __exceptionPreprocess + 172 1 libobjc.A.dylib 0x00007fff87f16e75 objc_exception_throw + 43 2 CoreFoundation 0x00007fff8949212d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205 3 CoreFoundation 0x00007fff893ed322 ___forwarding___ + 1010 4 CoreFoundation 0x00007fff893ecea8 _CF_forwarding_prep_0 + 120 5 Tk 0x0000000108253ed6 TkpInit + 459 6 Tk 0x00000001081d1b0f Tk_Init + 1687 7 _tkinter.so 0x00000001080b4c0d Tcl_AppInit + 77 8 _tkinter.so 0x00000001080b3657 Tkinter_Create + 919 9 Python 0x00000001000c2fad PyEval_EvalFrameEx + 21405 10 Python 0x00000001000c4fb3 PyEval_EvalCodeEx + 2115 11 Python 0x000000010003eac0 function_call + 176 12 Python 0x000000010000ceb2 PyObject_Call + 98 13 Python 0x000000010001f56d instancemethod_call + 365 14 Python 0x000000010000ceb2 PyObject_Call + 98 15 Python 0x00000001000bc957 PyEval_CallObjectWithKeywords + 87 16 Python 0x000000010002285e PyInstance_New + 126 17 Python 0x000000010000ceb2 PyObject_Call + 98 18 Python 0x00000001000c0c60 PyEval_EvalFrameEx + 12368 19 Python 0x00000001000c4fb3 PyEval_EvalCodeEx + 2115 20 Python 0x000000010003eac0 function_call + 176 21 Python 0x000000010000ceb2 PyObject_Call + 98 22 Python 0x000000010001f56d instancemethod_call + 365 23 Python 0x000000010000ceb2 PyObject_Call + 98 24 Python 0x00000001000bc957 PyEval_CallObjectWithKeywords + 87 25 Python 0x000000010002285e PyInstance_New + 126 26 Python 0x000000010000ceb2 PyObject_Call + 98 27 Python 0x00000001000c0c60 PyEval_EvalFrameEx + 12368 28 Python 0x00000001000c4fb3 PyEval_EvalCodeEx + 2115 29 Python 0x00000001000c50d6 PyEval_EvalCode + 54 30 Python 0x00000001000e995e PyRun_FileExFlags + 174 31 Python 0x00000001000e9bfa PyRun_SimpleFileExFlags + 458 32 Python 0x0000000100100c0d Py_Main + 3101 33 Python 0x0000000100000f14 Python + 3860 34 ??? 0x0000000000000002 0x0 + 2 ) libc++abi.dylib: terminating with uncaught exception of type NSException Abort trap: 6 </code></pre> <p>我不明白这个错误意味着什么,谁能帮我理解我做错了什么?</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>在这种情况下,错误信息并不能告诉我们太多。你需要做的(在一般的调试中)是找出什么是成功的,什么是失败的,以便缩小问题的范围。</p> <p>从一个只导入pyglet的脚本开始。如果可以,那么导入pyglet并打开一个窗口等。。。</p> <p>当您知道是哪一行导致错误发生时,请报告。</p> <p>乔恩</p>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
在python3中使用Scipy pearsonr函数
2 回答
在Python3中使用scipy对多个lorentzian进行数据拟合
2 回答
在Python3中使用Script=argv
4 回答
在python3中使用selenium webdriver进行未解析的回溯
7 回答
在python3中使用selenium和phantomjs的网页截图之前如何等待?
4 回答
在Python3中使用Selenium和Requests模块从网页获取文件
9 回答
在python3中使用SIGINT终止函数
4 回答
在Python3中使用SIGTERM时,允许进程完成而不是中断
1 回答
在python3中使用smtplib发送XML内容
9 回答
在python3中使用socket库(RFCOMM模式)重新连接蓝牙设备?
10 回答
在python3中使用sounddevice和numpy编写wav文件
4 回答
在python3中使用Sqlalchemy插入MySQL查找类型错误的原因
1 回答
在python3中使用sqlite、pandas和sqlalchemy很难让rollback工作
2 回答
在python3中使用SQLite的FTS3/4
8 回答
在Python3中使用struct.calcsize()和len()有区别吗?
2 回答
在python3中使用substring函数时发生TypeError
7 回答
在Python3中使用Tkinter entry小部件写入串行设备
3 回答
在python3中使用tkinter时,如何在每次按下函数时获得运行该函数的按钮?
4 回答
在python3中使用tkinter的子帧
3 回答
在Python3中使用tryexcept块时,如何避免使用未初始化的变量?
8 回答