marblexu / PythonPlantsVsZombies

a simple PlantsVsZombies game
3.45k stars 947 forks source link

Error on Mac 10.12 #27

Open ruozhiertong opened 3 years ago

ruozhiertong commented 3 years ago

Env: macos10.12 , python3.9.0, pygame in /usr/local/lib/python3.9/site-packages (2.0.0) When i type python3 main.py, there is a crash. Below is the info: pygame 2.0.0 (SDL 2.0.12, python 3.9.0) Hello from the pygame community. https://www.pygame.org/contribute.html 2020-11-23 18:26:35.411 Python[1396:30017] -[CAMetalLayer setDisplaySyncEnabled:]: unrecognized selector sent to instance 0x7fbf5f4aa840 2020-11-23 18:26:35.412 Python[1396:30017] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CAMetalLayer setDisplaySyncEnabled:]: unrecognized selector sent to instance 0x7fbf5f4aa840' First throw call stack: ( 0 CoreFoundation 0x00007fffd30dd57b exceptionPreprocess + 171 1 libobjc.A.dylib 0x00007fffe83571da objc_exception_throw + 48 2 CoreFoundation 0x00007fffd315df14 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132 3 CoreFoundation 0x00007fffd3050c93 __forwarding + 1059 4 CoreFoundation 0x00007fffd30507e8 _CF_forwarding_prep_0 + 120 5 libSDL2-2.0.dylib 0x00000001028600d7 METAL_CreateRenderer + 2359 6 libSDL2-2.0.dylib 0x00000001027a272d SDL_CreateRenderer_REAL + 189 7 libSDL2-2.0.dylib 0x000000010281d629 SDL_CreateWindowTexture + 457 8 libSDL2-2.0.dylib 0x0000000102821a27 SDL_GetWindowSurface_REAL + 167 9 display.cpython-39-darwin.so 0x0000000102ab87a9 pg_set_mode + 2185 10 Python 0x00000001021e7027 cfunction_call + 122 11 Python 0x00000001021b6fc4 _PyObject_MakeTpCall + 266 12 Python 0x000000010225d87d call_function + 618 13 Python 0x000000010225a5c1 _PyEval_EvalFrameDefault + 25325 14 Python 0x00000001021b7691 function_code_fastcall + 101 15 Python 0x000000010225d79f call_function + 396 16 Python 0x0000000102254610 _PyEval_EvalFrameDefault + 828 17 Python 0x000000010225e389 _PyEval_EvalCode + 2122 18 Python 0x0000000102254212 PyEval_EvalCode + 66 19 Python 0x00000001022906e7 run_eval_code_obj + 110 20 Python 0x000000010228faae run_mod + 103 21 Python 0x000000010228e945 PyRun_FileExFlags + 238 22 Python 0x000000010228df2a PyRun_SimpleFileExFlags + 277 23 Python 0x00000001022a5dec Py_RunMain + 1843 24 Python 0x00000001022a60b5 pymain_main + 223 25 Python 0x00000001022a625b Py_BytesMain + 42 26 libdyld.dylib 0x00007fffe8c8c235 start + 1 27 ??? 0x0000000000000002 0x0 + 2 ) libc++abi.dylib: terminating with uncaught exception of type NSException Abort trap: 6 Could u give me some advice for it? Thx!

Snoopy20221 commented 2 years ago

hi have you tried to re clone it