Python and PyGame Error Code 134: Cannot figure out why

浪尽此生 提交于 2021-02-05 11:20:43

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/28003827/python-and-pygame-error-code-134-cannot-figure-out-why

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!