Python和PyGame错误代码134:无法找出原因 [英] Python and PyGame Error Code 134: Cannot figure out why
问题描述
每次我在Windows上运行我的代码时,它都会起作用.我已经在Mac上使用Homebrew安装了pygame,并且该程序无法正常工作.其他程序在Mac上可以与pygame一起使用,但不是我的.这是我得到的错误:
Every time I run my code on Windows it works. I have installed pygame on Mac with Homebrew and the same program doesn't work. Other programs work on Mac with pygame, just not mine. Here is the error I get:
2015-01-17 15:09:41.591 Python[1237:51113] -[SDLApplication _setup:]: un
recognized selector sent to instance 0x105d271e0
2015-01-17 15:09:41.607 Python[1237:51113] An uncaught exception was raised
2015-01-17 15:09:41.607 Python[1237:51113] -[SDLApplication _setup:]: unrecognized selector sent to instance 0x105d271e0
2015-01-17 15:09:41.608 Python[1237:51113] (
0 CoreFoundation 0x00007fff8aa1f64c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff936ef6de objc_exception_throw + 43
2 CoreFoundation 0x00007fff8aa226bd -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00007fff8a969a84 ___forwarding___ + 1028
4 CoreFoundation 0x00007fff8a9695f8 _CF_forwarding_prep_0 + 120
5 Tk 0x00000001024a0527 TkpInit + 476
6 Tk 0x000000010241aaca Tk_Init + 1788
7 _tkinter.so 0x00000001007e2f2d Tcl_AppInit + 77
8 _tkinter.so 0x00000001007e0477 Tkinter_Create + 919
9 Python 0x00000001000e542b PyEval_EvalFrameEx + 31291
10 Python 0x00000001000e665d PyEval_EvalCodeEx + 2349
11 Python 0x000000010003f76a function_call + 186
12 Python 0x000000010000da08 PyObject_Call + 104
13 Python 0x000000010002941c method_call + 140
14 Python 0x000000010000da08 PyObject_Call + 104
15 Python 0x0000000100078651 slot_tp_init + 81
16 Python 0x00000001000736c4 type_call + 212
17 Python 0x000000010000da08 PyObject_Call + 104
18 Python 0x00000001000e1c3f PyEval_EvalFrameEx + 16975
19 Python 0x00000001000e665d PyEval_EvalCodeEx + 2349
20 Python 0x00000001000e671f PyEval_EvalCode + 63
21 Python 0x0000000100110b2e PyRun_FileExFlags + 206
22 Python 0x0000000100110edd PyRun_SimpleFileExFlags + 717
23 Python 0x000000010012856e Py_Main + 3262
24 Python 0x0000000100000e32 Python + 3634
25 Python 0x0000000100000c84 Python + 3204
26 ??? 0x0000000000000002 0x0 + 2
)
2015-01-17 15:09:41.608 Python[1237:51113] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SDLApplication _setup:]: unrecognized selector sent to instance 0x105d271e0'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff8aa1f64c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff936ef6de objc_exception_throw + 43
2 CoreFoundation 0x00007fff8aa226bd -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00007fff8a969a84 ___forwarding___ + 1028
4 CoreFoundation 0x00007fff8a9695f8 _CF_forwarding_prep_0 + 120
5 Tk 0x00000001024a0527 TkpInit + 476
6 Tk 0x000000010241aaca Tk_Init + 1788
7 _tkinter.so 0x00000001007e2f2d Tcl_AppInit + 77
8 _tkinter.so 0x00000001007e0477 Tkinter_Create + 919
9 Python 0x00000001000e542b PyEval_EvalFrameEx + 31291
10 Python 0x00000001000e665d PyEval_EvalCodeEx + 2349
11 Python 0x000000010003f76a function_call + 186
12 Python 0x000000010000da08 PyObject_Call + 104
13 Python 0x000000010002941c method_call + 140
14 Python 0x000000010000da08 PyObject_Call + 104
15 Python 0x0000000100078651 slot_tp_init + 81
16 Python 0x00000001000736c4 type_call + 212
17 Python 0x000000010000da08 PyObject_Call + 104
18 Python 0x00000001000e1c3f PyEval_EvalFrameEx + 16975
19 Python 0x00000001000e665d PyEval_EvalCodeEx + 2349
20 Python 0x00000001000e671f PyEval_EvalCode + 63
21 Python 0x0000000100110b2e PyRun_FileExFlags + 206
22 Python 0x0000000100110edd PyRun_SimpleFileExFlags + 717
23 Python 0x000000010012856e Py_Main + 3262
24 Python 0x0000000100000e32 Python + 3634
25 Python 0x0000000100000c84 Python + 3204
26 ??? 0x0000000000000002 0x0 + 2
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Process finished with exit code 134
能否请您告诉我出什么问题了.可能是什么错误.顺便说一句:我没有上传代码,因为使用不同的自定义模块的代码很长.希望有人可以通过查看错误来提供帮助.
Can you please tell me what is wrong. What could be the error. BTW: I didn't upload my code because it is very long with different custom modules. Hopefully someone can help just by looking at the error.
推荐答案
也许该程序需要的依赖关系是另一个程序所不需要的,在这种情况下,您的安装将是错误的.有关说明,请参见此关于在Mac上的安装.
Perhaps this program required a dependency that wasn't needed in another program, in which case your installation would be incorrect. See this for instructions about installation on Mac.
这篇关于Python和PyGame错误代码134:无法找出原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!