2021-03-08 14:21:24

hello, I'm having a weird error when packing my python application into executable, It prints this error, I first thought that it's wx but it apeers that it's not the reason
Anyways here's the error, It's vary big and has some weird numbers and leters
Also, I tried with pyinstaller and still i get the same error regardless of what packer i use.
documents/launcher/main/build/exe.macosx-10.9-x86_64-3.7/launcher ; exit;
mohameds-MacBook-Air:~ mohamed$ /Users/mohamed/Documents/launcher/main/build/exe.macosx-10.9-x86_64-3.7/launcher ; exit;
2021-03-08 16:03:19.175 launcher[2333:26645] -[SDLApplication transformToForegroundApplication]: unrecognized selector sent to instance 0x7fb28d5b25b0
2021-03-08 16:03:19.183 launcher[2333:26645] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SDLApplication transformToForegroundApplication]: unrecognized selector sent to instance 0x7fb28d5b25b0'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff375fdb57 __exceptionPreprocess + 250
    1   libobjc.A.dylib                     0x00007fff702ae5bf objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff3767cbe7 -[NSObject(NSObject) __retain_OA] + 0
    3   CoreFoundation                      0x00007fff375623bb ___forwarding___ + 1427
    4   CoreFoundation                      0x00007fff37561d98 _CF_forwarding_prep_0 + 120
    5   libwx_osx_cocoau_core-3.1.5.0.0.dyl 0x00000001089b3e5e _ZN5wxApp9DoInitGuiEv + 254
    6   libwx_osx_cocoau_core-3.1.5.0.0.dyl 0x0000000108a01d7e _ZN5wxApp9OnInitGuiEv + 30
    7   _core.cpython-37m-darwin.so         0x0000000107ec2a52 _ZN10sipwxPyApp9OnInitGuiEv + 98
    8   libwx_osx_cocoau_core-3.1.5.0.0.dyl 0x0000000108a01ba5 _ZN5wxApp10InitializeERiPPw + 165
    9   libwx_baseu-3.1.5.0.0.dylib         0x00000001091df58b _Z12wxEntryStartRiPPw + 171
    10  _core.cpython-37m-darwin.so         0x0000000107ec21a3 _ZN7wxPyApp13_BootstrapAppEv + 499
    11  _core.cpython-37m-darwin.so         0x0000000107ec63f4 _ZL26meth_wxPyApp__BootstrapAppP7_objectS0_ + 100
    12  Python                              0x0000000101eca4ec _PyMethodDef_RawFastCallKeywords + 668
    13  Python                              0x0000000101ec98fa _PyCFunction_FastCallKeywords + 42
    14  Python                              0x0000000101f897a4 call_function + 724
    15  Python                              0x0000000101f8677d _PyEval_EvalFrameDefault + 25181
    16  Python                              0x0000000101f8a303 _PyEval_EvalCodeWithName + 2467
    17  Python                              0x0000000101ec949b _PyFunction_FastCallDict + 523
    18  Python                              0x0000000101eca7df _PyObject_Call_Prepend + 143
    19  Python                              0x0000000101f19021 slot_tp_init + 145
    20  Python                              0x0000000101f14a09 type_call + 297
    21  Python                              0x0000000101ec9711 _PyObject_FastCallKeywords + 433
    22  Python                              0x0000000101f89674 call_function + 420
    23  Python                              0x0000000101f8677d _PyEval_EvalFrameDefault + 25181
    24  Python                              0x0000000101f8a303 _PyEval_EvalCodeWithName + 2467
    25  Python                              0x0000000101f80444 PyEval_EvalCode + 100
    26  Python                              0x0000000101f7d9ad builtin_exec + 557
    27  Python                              0x0000000101ec9ee8 _PyMethodDef_RawFastCallDict + 248
    28  Python                              0x0000000101ec9bc1 PyCFunction_Call + 209
    29  Python                              0x0000000101f86c0f _PyEval_EvalFrameDefault + 26351
    30  Python                              0x0000000101f8a303 _PyEval_EvalCodeWithName + 2467
    31  Python                              0x0000000101ec98c1 _PyFunction_FastCallKeywords + 257
    32  Python                              0x0000000101f897b2 call_function + 738
    33  Python                              0x0000000101f8677d _PyEval_EvalFrameDefault + 25181
    34  Python                              0x0000000101ec9d30 function_code_fastcall + 128
    35  Python                              0x0000000101f897b2 call_function + 738
    36  Python                              0x0000000101f86763 _PyEval_EvalFrameDefault + 25155
    37  Python                              0x0000000101ec9d30 function_code_fastcall + 128
    38  Python                              0x0000000101f897b2 call_function + 738
    39  Python                              0x0000000101f8681e _PyEval_EvalFrameDefault + 25342
    40  Python                              0x0000000101ec9d30 function_code_fastcall + 128
    41  Python                              0x0000000101f897b2 call_function + 738
    42  Python                              0x0000000101f8681e _PyEval_EvalFrameDefault + 25342
    43  Python                              0x0000000101ec9d30 function_code_fastcall + 128
    44  Python                              0x0000000101ec9324 _PyFunction_FastCallDict + 148
    45  Python                              0x0000000101ecb46c object_vacall + 316
    46  Python                              0x0000000101ecb561 _PyObject_CallMethodIdObjArgs + 177
    47  Python                              0x0000000101fa89af PyImport_ImportModuleLevelObject + 1535
    48  Python                              0x0000000101f7ce97 builtin___import__ + 135
    49  Python                              0x0000000101ec9b71 PyCFunction_Call + 129
    50  Python                              0x0000000101f86c0f _PyEval_EvalFrameDefault + 26351
    51  Python                              0x0000000101f8a303 _PyEval_EvalCodeWithName + 2467
    52  Python                              0x0000000101ec98c1 _PyFunction_FastCallKeywords + 257
    53  Python                              0x0000000101f897b2 call_function + 738
    54  Python                              0x0000000101f8681e _PyEval_EvalFrameDefault + 25342
    55  Python                              0x0000000101f8a303 _PyEval_EvalCodeWithName + 2467
    56  Python                              0x0000000101ec949b _PyFunction_FastCallDict + 523
    57  Python                              0x0000000101ecb46c object_vacall + 316
    58  Python                              0x0000000101ecb561 _PyObject_CallMethodIdObjArgs + 177
    59  Python                              0x0000000101fa8ca1 PyImport_ImportModuleLevelObject + 2289
    60  Python                              0x0000000101f850f5 _PyEval_EvalFrameDefault + 19413
    61  Python                              0x0000000101f8a303 _PyEval_EvalCodeWithName + 2467
    62  Python                              0x0000000101f80444 PyEval_EvalCode + 100
    63  Python                              0x0000000101f7d9ad builtin_exec + 557
    64  Python                              0x0000000101eca3fe _PyMethodDef_RawFastCallKeywords + 430
    65  Python                              0x0000000101ec98fa _PyCFunction_FastCallKeywords + 42
    66  Python                              0x0000000101f897a4 call_function + 724
    67  Python                              0x0000000101f8681e _PyEval_EvalFrameDefault + 25342
    68  Python                              0x0000000101ec9d30 function_code_fastcall + 128
    69  Python                              0x0000000101f897b2 call_function + 738
    70  Python                              0x0000000101f8677d _PyEval_EvalFrameDefault + 25181
    71  Python                              0x0000000101ec9d30 function_code_fastcall + 128
    72  Python                              0x0000000101ec9324 _PyFunction_FastCallDict + 148
    73  launcher                                0x0000000101e9cabb main + 1291
    74  libdyld.dylib                       0x00007fff71456cc9 start + 1
    75  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]

2021-03-08 18:45:17

The command or script you used to build  your python code would help.
But that being said, this looks a bit like some sort of library incompatibility or mismatch. Make sure all of the libraries your are using are compatible with each other. This does not always mean what ever the most recent version is. But do try to get the most up-to-date that you can.

I don’t believe in fighting unnecessarily.  But if something is worth fighting for, then its always a fight worth winning.
check me out on Twitter and on GitHub

2021-03-08 18:56:53 (edited by Quin 2021-03-08 18:57:06)

Is this an M1? If so, there's your problem. Tuns of libs don't work with M1 yet.

2021-03-08 23:38:28

@3 no, i don’t think it is an m1