Как решить NSInternalInconsistencyException в Джанго ⇐ Python
-
Anonymous
Как решить NSInternalInconsistencyException в Джанго
guys i am trying to run this project from github here . i cloned the repo and installed django (it doesn't have requirements file) and tried to run the project it runs till login, register page but then it goes bad. It throws this error
(base) rishikapadia@MacBook-Air budget_project % python manage.py runserver Watching for file changes with StatReloader Performing system checks... System check identified some issues: WARNINGS: budget_app.ExpenseInfo: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'. HINT: Configure the DEFAULT_AUTO_FIELD setting or the BudgetAppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. System check identified 1 issue (0 silenced). You have 3 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): auth. Run 'python manage.py migrate' to apply them. March 02, 2024 - 13:35:25 Django version 5.0.2, using settings 'budget_project.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C. [02/Mar/2024 13:35:27] "GET / HTTP/1.1" 200 1547 [02/Mar/2024 13:35:30] "GET /sign_up HTTP/1.1" 200 2137 [02/Mar/2024 13:35:56] "POST /sign_up HTTP/1.1" 302 0 /Volumes/Work/Finance/Django/Django-Budget-App/budget_project/budget_app/views.py:19: UserWarning: Starting a Matplotlib GUI outside of the main thread will likely fail. fig,ax=plt.subplots() *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow should only be instantiated on the main thread!' *** First throw call stack: ( 0 CoreFoundation 0x00000001831ac540 __exceptionPreprocess + 176 1 libobjc.A.dylib 0x0000000182c9deb4 objc_exception_throw + 60 2 CoreFoundation 0x00000001831d188c _CFBundleGetValueForInfoKey + 0 3 AppKit 0x00000001869257c0 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 188 4 AppKit 0x00000001869256f8 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 48 5 _macosx.cpython-311-darwin.so 0x0000000103cf11c8 -[Window initWithContentRect:styleMask:backing:defer:withManager:] + 68 6 _macosx.cpython-311-darwin.so 0x0000000103cf3f80 FigureManager_init + 240 7 python3.11 0x0000000100f0ec70 wrap_init + 20 8 python3.11 0x0000000100e8d508 wrapperdescr_call + 636 9 python3.11 0x0000000100fc19bc _PyEval_EvalFrameDefault + 192324 10 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 11 python3.11 0x0000000100e80824 _PyObject_Call_Prepend + 164 12 python3.11 0x0000000100f0ea3c slot_tp_init + 212 13 python3.11 0x0000000100f042d8 type_call + 136 14 python3.11 0x0000000100fc19bc _PyEval_EvalFrameDefault + 192324 15 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 16 python3.11 0x0000000100e83b18 method_vectorcall + 296 17 python3.11 0x0000000100fc63f8 _PyEval_EvalFrameDefault + 211328 18 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 19 python3.11 0x0000000100fc63f8 _PyEval_EvalFrameDefault + 211328 20 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 21 python3.11 0x0000000100fc6024 _PyEval_EvalFrameDefault + 210348 22 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 23 python3.11 0x0000000100fc6024 _PyEval_EvalFrameDefault + 210348 24 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 25 python3.11 0x0000000100e80824 _PyObject_Call_Prepend + 164 26 python3.11 0x0000000100f0d054 slot_tp_call + 120 27 python3.11 0x0000000100fc19bc _PyEval_EvalFrameDefault + 192324 28 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 29 python3.11 0x0000000100e80824 _PyObject_Call_Prepend + 164 30 python3.11 0x0000000100f0d054 slot_tp_call + 120 31 python3.11 0x0000000100fc19bc _PyEval_EvalFrameDefault + 192324 32 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 33 python3.11 0x0000000100e80824 _PyObject_Call_Prepend + 164 34 python3.11 0x0000000100f0d054 slot_tp_call + 120 35 python3.11 0x0000000100fc19bc _PyEval_EvalFrameDefault + 192324 36 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 37 python3.11 0x0000000100e80824 _PyObject_Call_Prepend + 164 38 python3.11 0x0000000100f0d054 slot_tp_call + 120 39 python3.11 0x0000000100fc19bc _PyEval_EvalFrameDefault + 192324 40 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 41 python3.11 0x0000000100e80824 _PyObject_Call_Prepend + 164 42 python3.11 0x0000000100f0d054 slot_tp_call + 120 43 python3.11 0x0000000100fc19bc _PyEval_EvalFrameDefault + 192324 44 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 45 python3.11 0x0000000100e80824 _PyObject_Call_Prepend + 164 46 python3.11 0x0000000100f0d054 slot_tp_call + 120 47 python3.11 0x0000000100fc19bc _PyEval_EvalFrameDefault + 192324 48 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 49 python3.11 0x0000000100e80824 _PyObject_Call_Prepend + 164 50 python3.11 0x0000000100f0d054 slot_tp_call + 120 51 python3.11 0x0000000100fc19bc _PyEval_EvalFrameDefault + 192324 52 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 53 python3.11 0x0000000100e80824 _PyObject_Call_Prepend + 164 54 python3.11 0x0000000100f0d054 slot_tp_call + 120 55 python3.11 0x0000000100fc19bc _PyEval_EvalFrameDefault + 192324 56 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 57 python3.11 0x0000000100e80824 _PyObject_Call_Prepend + 164 58 python3.11 0x0000000100f0d054 slot_tp_call + 120 59 python3.11 0x0000000100fc19bc _PyEval_EvalFrameDefault + 192324 60 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 61 python3.11 0x0000000100e80824 _PyObject_Call_Prepend + 164 62 python3.11 0x0000000100f0ea3c slot_tp_init + 212 63 python3.11 0x0000000100f042d8 type_call + 136 64 python3.11 0x0000000100fc19bc _PyEval_EvalFrameDefault + 192324 65 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 66 python3.11 0x0000000100e83a94 method_vectorcall + 164 67 python3.11 0x0000000100fc6024 _PyEval_EvalFrameDefault + 210348 68 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 69 python3.11 0x0000000100e83b5c method_vectorcall + 364 70 python3.11 0x00000001010ac720 thread_run + 228 71 python3.11 0x0000000101037358 pythread_wrapper + 48 72 libsystem_pthread.dylib 0x000000018305a034 _pthread_start + 136 73 libsystem_pthread.dylib 0x0000000183054e3c thread_start + 8 ) libc++abi: terminating due to uncaught exception of type NSException (base) rishikapadia@MacBook-Air budget_project % please guys help me urgently i am stuck and want to try this one!
Источник: https://stackoverflow.com/questions/780 ... -in-django
guys i am trying to run this project from github here . i cloned the repo and installed django (it doesn't have requirements file) and tried to run the project it runs till login, register page but then it goes bad. It throws this error
(base) rishikapadia@MacBook-Air budget_project % python manage.py runserver Watching for file changes with StatReloader Performing system checks... System check identified some issues: WARNINGS: budget_app.ExpenseInfo: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'. HINT: Configure the DEFAULT_AUTO_FIELD setting or the BudgetAppConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. System check identified 1 issue (0 silenced). You have 3 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): auth. Run 'python manage.py migrate' to apply them. March 02, 2024 - 13:35:25 Django version 5.0.2, using settings 'budget_project.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C. [02/Mar/2024 13:35:27] "GET / HTTP/1.1" 200 1547 [02/Mar/2024 13:35:30] "GET /sign_up HTTP/1.1" 200 2137 [02/Mar/2024 13:35:56] "POST /sign_up HTTP/1.1" 302 0 /Volumes/Work/Finance/Django/Django-Budget-App/budget_project/budget_app/views.py:19: UserWarning: Starting a Matplotlib GUI outside of the main thread will likely fail. fig,ax=plt.subplots() *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow should only be instantiated on the main thread!' *** First throw call stack: ( 0 CoreFoundation 0x00000001831ac540 __exceptionPreprocess + 176 1 libobjc.A.dylib 0x0000000182c9deb4 objc_exception_throw + 60 2 CoreFoundation 0x00000001831d188c _CFBundleGetValueForInfoKey + 0 3 AppKit 0x00000001869257c0 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 188 4 AppKit 0x00000001869256f8 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 48 5 _macosx.cpython-311-darwin.so 0x0000000103cf11c8 -[Window initWithContentRect:styleMask:backing:defer:withManager:] + 68 6 _macosx.cpython-311-darwin.so 0x0000000103cf3f80 FigureManager_init + 240 7 python3.11 0x0000000100f0ec70 wrap_init + 20 8 python3.11 0x0000000100e8d508 wrapperdescr_call + 636 9 python3.11 0x0000000100fc19bc _PyEval_EvalFrameDefault + 192324 10 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 11 python3.11 0x0000000100e80824 _PyObject_Call_Prepend + 164 12 python3.11 0x0000000100f0ea3c slot_tp_init + 212 13 python3.11 0x0000000100f042d8 type_call + 136 14 python3.11 0x0000000100fc19bc _PyEval_EvalFrameDefault + 192324 15 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 16 python3.11 0x0000000100e83b18 method_vectorcall + 296 17 python3.11 0x0000000100fc63f8 _PyEval_EvalFrameDefault + 211328 18 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 19 python3.11 0x0000000100fc63f8 _PyEval_EvalFrameDefault + 211328 20 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 21 python3.11 0x0000000100fc6024 _PyEval_EvalFrameDefault + 210348 22 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 23 python3.11 0x0000000100fc6024 _PyEval_EvalFrameDefault + 210348 24 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 25 python3.11 0x0000000100e80824 _PyObject_Call_Prepend + 164 26 python3.11 0x0000000100f0d054 slot_tp_call + 120 27 python3.11 0x0000000100fc19bc _PyEval_EvalFrameDefault + 192324 28 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 29 python3.11 0x0000000100e80824 _PyObject_Call_Prepend + 164 30 python3.11 0x0000000100f0d054 slot_tp_call + 120 31 python3.11 0x0000000100fc19bc _PyEval_EvalFrameDefault + 192324 32 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 33 python3.11 0x0000000100e80824 _PyObject_Call_Prepend + 164 34 python3.11 0x0000000100f0d054 slot_tp_call + 120 35 python3.11 0x0000000100fc19bc _PyEval_EvalFrameDefault + 192324 36 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 37 python3.11 0x0000000100e80824 _PyObject_Call_Prepend + 164 38 python3.11 0x0000000100f0d054 slot_tp_call + 120 39 python3.11 0x0000000100fc19bc _PyEval_EvalFrameDefault + 192324 40 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 41 python3.11 0x0000000100e80824 _PyObject_Call_Prepend + 164 42 python3.11 0x0000000100f0d054 slot_tp_call + 120 43 python3.11 0x0000000100fc19bc _PyEval_EvalFrameDefault + 192324 44 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 45 python3.11 0x0000000100e80824 _PyObject_Call_Prepend + 164 46 python3.11 0x0000000100f0d054 slot_tp_call + 120 47 python3.11 0x0000000100fc19bc _PyEval_EvalFrameDefault + 192324 48 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 49 python3.11 0x0000000100e80824 _PyObject_Call_Prepend + 164 50 python3.11 0x0000000100f0d054 slot_tp_call + 120 51 python3.11 0x0000000100fc19bc _PyEval_EvalFrameDefault + 192324 52 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 53 python3.11 0x0000000100e80824 _PyObject_Call_Prepend + 164 54 python3.11 0x0000000100f0d054 slot_tp_call + 120 55 python3.11 0x0000000100fc19bc _PyEval_EvalFrameDefault + 192324 56 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 57 python3.11 0x0000000100e80824 _PyObject_Call_Prepend + 164 58 python3.11 0x0000000100f0d054 slot_tp_call + 120 59 python3.11 0x0000000100fc19bc _PyEval_EvalFrameDefault + 192324 60 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 61 python3.11 0x0000000100e80824 _PyObject_Call_Prepend + 164 62 python3.11 0x0000000100f0ea3c slot_tp_init + 212 63 python3.11 0x0000000100f042d8 type_call + 136 64 python3.11 0x0000000100fc19bc _PyEval_EvalFrameDefault + 192324 65 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 66 python3.11 0x0000000100e83a94 method_vectorcall + 164 67 python3.11 0x0000000100fc6024 _PyEval_EvalFrameDefault + 210348 68 python3.11 0x0000000100e7e3cc _PyFunction_Vectorcall + 476 69 python3.11 0x0000000100e83b5c method_vectorcall + 364 70 python3.11 0x00000001010ac720 thread_run + 228 71 python3.11 0x0000000101037358 pythread_wrapper + 48 72 libsystem_pthread.dylib 0x000000018305a034 _pthread_start + 136 73 libsystem_pthread.dylib 0x0000000183054e3c thread_start + 8 ) libc++abi: terminating due to uncaught exception of type NSException (base) rishikapadia@MacBook-Air budget_project % please guys help me urgently i am stuck and want to try this one!
Источник: https://stackoverflow.com/questions/780 ... -in-django