[INFO] [2022-10-06 09:58:00,720] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 09:59:00,305] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/urls.py changed, reloading. [INFO] [2022-10-06 09:59:00,523] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 09:59:19,344] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/groupview.py changed, reloading. [INFO] [2022-10-06 09:59:19,565] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 09:59:48,415] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/groupview.py changed, reloading. [INFO] [2022-10-06 09:59:48,626] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:03:40,770] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/groupview.py changed, reloading. [INFO] [2022-10-06 10:03:41,037] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:06:20,058] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:06:20,371] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:06:29,931] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:06:30,222] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:08:37,175] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:08:37,486] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:09:00,541] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:09:00,839] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [ERROR] [2022-10-06 10:09:06,754] [grouplistview.py:27] [grouplistview:post] - 组名已存在,请修改组名重新上传 [ERROR] [2022-10-06 10:09:06,754] [log.py:224] [log:log_response] - Internal Server Error: /api/v1/group/ [ERROR] [2022-10-06 10:09:06,754] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/group/ HTTP/1.1" 500 45 [INFO] [2022-10-06 10:09:12,044] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/group/ HTTP/1.1" 200 89 [ERROR] [2022-10-06 10:10:42,937] [groupview.py:23] [groupview:post] - 组名不能位空 [ERROR] [2022-10-06 10:10:42,937] [log.py:224] [log:log_response] - Internal Server Error: /api/v1/group/TestLaboratory_V1_Group_2/edit [ERROR] [2022-10-06 10:10:42,938] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/group/TestLaboratory_V1_Group_2/edit HTTP/1.1" 500 18 [INFO] [2022-10-06 10:11:06,159] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/group/TestLaboratory_V1_Group_2/edit HTTP/1.1" 200 15 [INFO] [2022-10-06 10:12:17,548] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:12:17,859] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:13:48,708] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:13:49,022] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:13:55,459] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:13:55,759] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:14:06,244] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:14:06,549] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:18:13,179] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:18:13,537] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:18:32,426] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:18:32,680] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:18:57,639] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:18:57,848] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:19:20,517] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:19:20,727] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:19:39,545] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:19:39,836] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:20:18,982] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:20:19,181] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:22:16,913] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:22:17,235] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:22:29,959] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:22:30,279] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:26:47,918] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:26:48,241] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:27:35,080] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:27:35,393] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:28:22,060] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:28:22,362] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:28:29,764] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:28:29,991] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:28:50,781] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:28:50,993] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:30:47,323] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:30:47,640] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [ERROR] [2022-10-06 10:31:21,296] [log.py:224] [log:log_response] - Internal Server Error: /api/v1/group/ Traceback (most recent call last): File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view return view_func(*args, **kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view return self.dispatch(request, *args, **kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 509, in dispatch response = self.handle_exception(exc) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 469, in handle_exception self.raise_uncaught_exception(exc) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception raise exc File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 506, in dispatch response = handler(request, *args, **kwargs) File "/Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/middleware/rolecontrol.py", line 48, in __call__ return self.func(request, *args, **kwargs) File "/Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py", line 64, in get for user in group.users: TypeError: 'ManyRelatedManager' object is not iterable [ERROR] [2022-10-06 10:31:21,297] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group/ HTTP/1.1" 500 100883 [INFO] [2022-10-06 10:31:24,952] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group HTTP/1.1" 301 0 [ERROR] [2022-10-06 10:31:24,995] [log.py:224] [log:log_response] - Internal Server Error: /api/v1/group/ Traceback (most recent call last): File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view return view_func(*args, **kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view return self.dispatch(request, *args, **kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 509, in dispatch response = self.handle_exception(exc) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 469, in handle_exception self.raise_uncaught_exception(exc) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception raise exc File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 506, in dispatch response = handler(request, *args, **kwargs) File "/Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/middleware/rolecontrol.py", line 48, in __call__ return self.func(request, *args, **kwargs) File "/Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py", line 64, in get for user in group.users: TypeError: 'ManyRelatedManager' object is not iterable [ERROR] [2022-10-06 10:31:24,995] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group/ HTTP/1.1" 500 101039 [INFO] [2022-10-06 10:32:58,128] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:32:58,419] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:33:01,938] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group HTTP/1.1" 301 0 [ERROR] [2022-10-06 10:33:02,042] [log.py:224] [log:log_response] - Internal Server Error: /api/v1/group/ Traceback (most recent call last): File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view return view_func(*args, **kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view return self.dispatch(request, *args, **kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 509, in dispatch response = self.handle_exception(exc) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 469, in handle_exception self.raise_uncaught_exception(exc) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception raise exc File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 506, in dispatch response = handler(request, *args, **kwargs) File "/Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/middleware/rolecontrol.py", line 48, in __call__ return self.func(request, *args, **kwargs) File "/Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py", line 65, in get for user in group.users: TypeError: 'ManyRelatedManager' object is not iterable [ERROR] [2022-10-06 10:33:02,043] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group/ HTTP/1.1" 500 101255 [INFO] [2022-10-06 10:33:14,177] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:33:14,401] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:33:15,647] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group HTTP/1.1" 301 0 [ERROR] [2022-10-06 10:33:15,726] [log.py:224] [log:log_response] - Internal Server Error: /api/v1/group/ Traceback (most recent call last): File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view return view_func(*args, **kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view return self.dispatch(request, *args, **kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 511, in dispatch self.response = self.finalize_response(request, response, *args, **kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 423, in finalize_response assert isinstance(response, HttpResponseBase), ( AssertionError: Expected a `Response`, `HttpResponse` or `HttpStreamingResponse` to be returned from the view, but received a `` [ERROR] [2022-10-06 10:33:15,726] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group/ HTTP/1.1" 500 81482 [INFO] [2022-10-06 10:33:42,316] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:33:42,611] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:33:45,799] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group HTTP/1.1" 301 0 [INFO] [2022-10-06 10:33:45,843] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group/ HTTP/1.1" 200 209 [INFO] [2022-10-06 10:41:55,738] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:41:56,043] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:45:53,626] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/groupview.py changed, reloading. [INFO] [2022-10-06 10:45:53,975] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:47:25,424] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/groupview.py changed, reloading. [INFO] [2022-10-06 10:47:25,748] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:47:43,544] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/groupview.py changed, reloading. [INFO] [2022-10-06 10:47:43,832] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:50:15,710] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/group/views/grouplistview.py changed, reloading. [INFO] [2022-10-06 10:50:16,024] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [WARNING] [2022-10-06 10:51:05,849] [log.py:224] [log:log_response] - Method Not Allowed: /api/v1/group/TestLaboratory_V1_Group_2 [WARNING] [2022-10-06 10:51:05,873] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group/TestLaboratory_V1_Group_2 HTTP/1.1" 405 40 [INFO] [2022-10-06 10:51:13,483] [basehttp.py:161] [basehttp:log_message] - "DELETE /api/v1/group/TestLaboratory_V1_Group_2 HTTP/1.1" 200 12 [INFO] [2022-10-06 10:51:18,277] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group HTTP/1.1" 301 0 [INFO] [2022-10-06 10:51:18,295] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group/ HTTP/1.1" 200 104 [INFO] [2022-10-06 10:54:11,717] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group?code=762563 HTTP/1.1" 301 0 [INFO] [2022-10-06 10:54:11,751] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group/?code=762563 HTTP/1.1" 200 104 [INFO] [2022-10-06 10:54:13,380] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group?code=762563 HTTP/1.1" 301 0 [INFO] [2022-10-06 10:54:13,403] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group/?code=762563 HTTP/1.1" 200 104 [INFO] [2022-10-06 10:54:16,411] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group?code=76256 HTTP/1.1" 301 0 [INFO] [2022-10-06 10:54:16,422] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group/?code=76256 HTTP/1.1" 200 2 [INFO] [2022-10-06 10:54:19,944] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group?code=762563 HTTP/1.1" 301 0 [INFO] [2022-10-06 10:54:19,966] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group/?code=762563 HTTP/1.1" 200 104 [INFO] [2022-10-06 10:59:11,305] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/urls.py changed, reloading. [INFO] [2022-10-06 10:59:11,636] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 10:59:39,798] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/urls.py changed, reloading. [INFO] [2022-10-06 10:59:40,088] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [WARNING] [2022-10-06 11:00:58,926] [log.py:224] [log:log_response] - Method Not Allowed: /api/v1/users/TestLaboratory_V1_User_2/join [WARNING] [2022-10-06 11:00:58,927] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/users/TestLaboratory_V1_User_2/join HTTP/1.1" 405 40 [ERROR] [2022-10-06 11:01:02,832] [userjoinview.py:23] [userjoinview:post] - 分组不存在 [ERROR] [2022-10-06 11:01:02,832] [log.py:224] [log:log_response] - Internal Server Error: /api/v1/users/TestLaboratory_V1_User_2/join [ERROR] [2022-10-06 11:01:02,833] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/users/TestLaboratory_V1_User_2/join HTTP/1.1" 500 15 [INFO] [2022-10-06 11:01:19,975] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/users/TestLaboratory_V1_User_2/join HTTP/1.1" 200 12 [INFO] [2022-10-06 11:02:18,984] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/urls.py changed, reloading. [INFO] [2022-10-06 11:02:19,337] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 11:03:10,716] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/urls.py changed, reloading. [INFO] [2022-10-06 11:03:10,984] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [ERROR] [2022-10-06 11:04:00,849] [userjoinview.py:23] [userjoinview:post] - 分组不存在 [ERROR] [2022-10-06 11:04:00,850] [log.py:224] [log:log_response] - Internal Server Error: /api/v1/users/TestLaboratory_V1_User_2/join [ERROR] [2022-10-06 11:04:00,851] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/users/TestLaboratory_V1_User_2/join HTTP/1.1" 500 15 [INFO] [2022-10-06 11:04:15,014] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/users/TestLaboratory_V1_User_2/quit HTTP/1.1" 200 12 [INFO] [2022-10-06 11:06:24,370] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/views/userlistview.py changed, reloading. [INFO] [2022-10-06 11:06:24,737] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 11:06:37,390] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/views/userlistview.py changed, reloading. [INFO] [2022-10-06 11:06:37,596] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 11:07:18,652] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/users/ HTTP/1.1" 200 12 [INFO] [2022-10-06 11:08:30,640] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/users/login HTTP/1.1" 200 296 [ERROR] [2022-10-06 11:08:49,679] [log.py:224] [log:log_response] - Internal Server Error: /api/v1/users/ Traceback (most recent call last): File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view return view_func(*args, **kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view return self.dispatch(request, *args, **kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 509, in dispatch response = self.handle_exception(exc) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 469, in handle_exception self.raise_uncaught_exception(exc) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception raise exc File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 506, in dispatch response = handler(request, *args, **kwargs) File "/Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/middleware/rolecontrol.py", line 48, in __call__ return self.func(request, *args, **kwargs) File "/Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/views/userlistview.py", line 75, in get if user.group not in user_group_index.keys(): AttributeError: 'User' object has no attribute 'group' [ERROR] [2022-10-06 11:08:49,680] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/users/%0A HTTP/1.1" 500 101050 [INFO] [2022-10-06 11:11:17,096] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/views/userlistview.py changed, reloading. [INFO] [2022-10-06 11:11:17,417] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 11:11:30,623] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/users/%0A HTTP/1.1" 200 493 [INFO] [2022-10-06 11:12:18,900] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/users/%0A HTTP/1.1" 200 495 [INFO] [2022-10-06 11:19:37,421] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/views/userlistview.py changed, reloading. [INFO] [2022-10-06 11:19:37,730] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 11:20:05,029] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/users/%0A HTTP/1.1" 200 515 [INFO] [2022-10-06 11:22:38,128] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/views/userview.py changed, reloading. [INFO] [2022-10-06 11:22:38,457] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 11:23:01,401] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/views/userview.py changed, reloading. [INFO] [2022-10-06 11:23:01,675] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [INFO] [2022-10-06 11:25:03,778] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/group/ HTTP/1.1" 200 84 [INFO] [2022-10-06 11:25:36,752] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/group/TestLaboratory_V1_Group_3/edit HTTP/1.1" 200 15 [INFO] [2022-10-06 11:25:47,805] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group?code=596640 HTTP/1.1" 301 0 [INFO] [2022-10-06 11:25:47,825] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group/?code=596640 HTTP/1.1" 200 101 [INFO] [2022-10-06 11:26:00,853] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/users/TestLaboratory_V1_User_2/join HTTP/1.1" 200 12 [INFO] [2022-10-06 11:26:08,278] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group HTTP/1.1" 301 0 [INFO] [2022-10-06 11:26:08,304] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group/ HTTP/1.1" 200 267 [INFO] [2022-10-06 11:26:33,793] [basehttp.py:161] [basehttp:log_message] - "DELETE /api/v1/group/TestLaboratory_V1_Group_3 HTTP/1.1" 200 12 [INFO] [2022-10-06 11:26:37,691] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group HTTP/1.1" 301 0 [INFO] [2022-10-06 11:26:37,712] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/group/ HTTP/1.1" 200 104 [ERROR] [2022-10-06 11:26:58,747] [userlistview.py:38] [userlistview:post] - 用户名已存在,请修改用户名重新上传 [ERROR] [2022-10-06 11:26:58,748] [log.py:224] [log:log_response] - Internal Server Error: /api/v1/users/ [ERROR] [2022-10-06 11:26:58,749] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/users/ HTTP/1.1" 500 51 [INFO] [2022-10-06 11:27:04,845] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/users/ HTTP/1.1" 200 12 [INFO] [2022-10-06 11:27:08,964] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/users/login HTTP/1.1" 200 296 [ERROR] [2022-10-06 11:27:29,246] [log.py:224] [log:log_response] - Internal Server Error: /api/v1/users/TestLaboratory_V1_User_5/edit Traceback (most recent call last): File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/backends/mysql/base.py", line 73, in execute return self.cursor.execute(query, args) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/cursors.py", line 170, in execute result = self._query(query) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/cursors.py", line 328, in _query conn.query(q) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/connections.py", line 516, in query self._affected_rows = self._read_query_result(unbuffered=unbuffered) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/connections.py", line 727, in _read_query_result result.read() File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/connections.py", line 1066, in read first_packet = self.connection._read_packet() File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/connections.py", line 683, in _read_packet packet.check_error() File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/protocol.py", line 220, in check_error err.raise_mysql_exception(self._data) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/err.py", line 109, in raise_mysql_exception raise errorclass(errno, errval) pymysql.err.IntegrityError: (1062, "Duplicate entry 'doctor' for key 'user.username'") The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view return view_func(*args, **kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view return self.dispatch(request, *args, **kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 509, in dispatch response = self.handle_exception(exc) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 469, in handle_exception self.raise_uncaught_exception(exc) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception raise exc File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 506, in dispatch response = handler(request, *args, **kwargs) File "/Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/middleware/rolecontrol.py", line 48, in __call__ return self.func(request, *args, **kwargs) File "/Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/views/userview.py", line 60, in post user.save() File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/models/base.py", line 726, in save self.save_base(using=using, force_insert=force_insert, File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/models/base.py", line 763, in save_base updated = self._save_table( File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/models/base.py", line 845, in _save_table updated = self._do_update(base_qs, using, pk_val, values, update_fields, File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/models/base.py", line 899, in _do_update return filtered._update(values) > 0 File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/models/query.py", line 802, in _update return query.get_compiler(self.db).execute_sql(CURSOR) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1559, in execute_sql cursor = super().execute_sql(result_type) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql cursor.execute(sql, params) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/backends/utils.py", line 98, in execute return super().execute(sql, params) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/backends/utils.py", line 66, in execute return self._execute_with_wrappers(sql, params, many=False, executor=self._execute) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers return executor(sql, params, many, context) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/backends/mysql/base.py", line 73, in execute return self.cursor.execute(query, args) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/cursors.py", line 170, in execute result = self._query(query) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/cursors.py", line 328, in _query conn.query(q) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/connections.py", line 516, in query self._affected_rows = self._read_query_result(unbuffered=unbuffered) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/connections.py", line 727, in _read_query_result result.read() File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/connections.py", line 1066, in read first_packet = self.connection._read_packet() File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/connections.py", line 683, in _read_packet packet.check_error() File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/protocol.py", line 220, in check_error err.raise_mysql_exception(self._data) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/err.py", line 109, in raise_mysql_exception raise errorclass(errno, errval) django.db.utils.IntegrityError: (1062, "Duplicate entry 'doctor' for key 'user.username'") [ERROR] [2022-10-06 11:27:29,256] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/users/TestLaboratory_V1_User_5/edit HTTP/1.1" 500 248807 [ERROR] [2022-10-06 11:27:32,414] [log.py:224] [log:log_response] - Internal Server Error: /api/v1/users/TestLaboratory_V1_User_5/edit Traceback (most recent call last): File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/backends/mysql/base.py", line 73, in execute return self.cursor.execute(query, args) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/cursors.py", line 170, in execute result = self._query(query) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/cursors.py", line 328, in _query conn.query(q) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/connections.py", line 516, in query self._affected_rows = self._read_query_result(unbuffered=unbuffered) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/connections.py", line 727, in _read_query_result result.read() File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/connections.py", line 1066, in read first_packet = self.connection._read_packet() File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/connections.py", line 683, in _read_packet packet.check_error() File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/protocol.py", line 220, in check_error err.raise_mysql_exception(self._data) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/err.py", line 109, in raise_mysql_exception raise errorclass(errno, errval) pymysql.err.IntegrityError: (1062, "Duplicate entry 'doctor' for key 'user.username'") The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view return view_func(*args, **kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view return self.dispatch(request, *args, **kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 509, in dispatch response = self.handle_exception(exc) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 469, in handle_exception self.raise_uncaught_exception(exc) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception raise exc File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 506, in dispatch response = handler(request, *args, **kwargs) File "/Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/middleware/rolecontrol.py", line 48, in __call__ return self.func(request, *args, **kwargs) File "/Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/views/userview.py", line 60, in post user.save() File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/models/base.py", line 726, in save self.save_base(using=using, force_insert=force_insert, File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/models/base.py", line 763, in save_base updated = self._save_table( File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/models/base.py", line 845, in _save_table updated = self._do_update(base_qs, using, pk_val, values, update_fields, File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/models/base.py", line 899, in _do_update return filtered._update(values) > 0 File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/models/query.py", line 802, in _update return query.get_compiler(self.db).execute_sql(CURSOR) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1559, in execute_sql cursor = super().execute_sql(result_type) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql cursor.execute(sql, params) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/backends/utils.py", line 98, in execute return super().execute(sql, params) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/backends/utils.py", line 66, in execute return self._execute_with_wrappers(sql, params, many=False, executor=self._execute) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers return executor(sql, params, many, context) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/backends/mysql/base.py", line 73, in execute return self.cursor.execute(query, args) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/cursors.py", line 170, in execute result = self._query(query) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/cursors.py", line 328, in _query conn.query(q) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/connections.py", line 516, in query self._affected_rows = self._read_query_result(unbuffered=unbuffered) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/connections.py", line 727, in _read_query_result result.read() File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/connections.py", line 1066, in read first_packet = self.connection._read_packet() File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/connections.py", line 683, in _read_packet packet.check_error() File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/protocol.py", line 220, in check_error err.raise_mysql_exception(self._data) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/err.py", line 109, in raise_mysql_exception raise errorclass(errno, errval) django.db.utils.IntegrityError: (1062, "Duplicate entry 'doctor' for key 'user.username'") [ERROR] [2022-10-06 11:27:32,477] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/users/TestLaboratory_V1_User_5/edit HTTP/1.1" 500 248676 [ERROR] [2022-10-06 11:28:12,635] [log.py:224] [log:log_response] - Internal Server Error: /api/v1/users/TestLaboratory_V1_User_5/edit Traceback (most recent call last): File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/backends/mysql/base.py", line 73, in execute return self.cursor.execute(query, args) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/cursors.py", line 170, in execute result = self._query(query) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/cursors.py", line 328, in _query conn.query(q) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/connections.py", line 516, in query self._affected_rows = self._read_query_result(unbuffered=unbuffered) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/connections.py", line 727, in _read_query_result result.read() File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/connections.py", line 1066, in read first_packet = self.connection._read_packet() File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/connections.py", line 683, in _read_packet packet.check_error() File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/protocol.py", line 220, in check_error err.raise_mysql_exception(self._data) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/err.py", line 109, in raise_mysql_exception raise errorclass(errno, errval) pymysql.err.IntegrityError: (1062, "Duplicate entry 'doctor' for key 'user.username'") The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view return view_func(*args, **kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/views/generic/base.py", line 70, in view return self.dispatch(request, *args, **kwargs) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 509, in dispatch response = self.handle_exception(exc) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 469, in handle_exception self.raise_uncaught_exception(exc) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception raise exc File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/rest_framework/views.py", line 506, in dispatch response = handler(request, *args, **kwargs) File "/Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/middleware/rolecontrol.py", line 48, in __call__ return self.func(request, *args, **kwargs) File "/Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/views/userview.py", line 60, in post user.save() File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/models/base.py", line 726, in save self.save_base(using=using, force_insert=force_insert, File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/models/base.py", line 763, in save_base updated = self._save_table( File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/models/base.py", line 845, in _save_table updated = self._do_update(base_qs, using, pk_val, values, update_fields, File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/models/base.py", line 899, in _do_update return filtered._update(values) > 0 File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/models/query.py", line 802, in _update return query.get_compiler(self.db).execute_sql(CURSOR) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1559, in execute_sql cursor = super().execute_sql(result_type) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql cursor.execute(sql, params) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/backends/utils.py", line 98, in execute return super().execute(sql, params) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/backends/utils.py", line 66, in execute return self._execute_with_wrappers(sql, params, many=False, executor=self._execute) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers return executor(sql, params, many, context) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/django/db/backends/mysql/base.py", line 73, in execute return self.cursor.execute(query, args) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/cursors.py", line 170, in execute result = self._query(query) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/cursors.py", line 328, in _query conn.query(q) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/connections.py", line 516, in query self._affected_rows = self._read_query_result(unbuffered=unbuffered) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/connections.py", line 727, in _read_query_result result.read() File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/connections.py", line 1066, in read first_packet = self.connection._read_packet() File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/connections.py", line 683, in _read_packet packet.check_error() File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/protocol.py", line 220, in check_error err.raise_mysql_exception(self._data) File "/Users/liufan/program/software/python/miniforge3/lib/python3.9/site-packages/pymysql/err.py", line 109, in raise_mysql_exception raise errorclass(errno, errval) django.db.utils.IntegrityError: (1062, "Duplicate entry 'doctor' for key 'user.username'") [ERROR] [2022-10-06 11:28:12,644] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/users/TestLaboratory_V1_User_5/edit HTTP/1.1" 500 248676 [INFO] [2022-10-06 11:30:02,301] [autoreload.py:251] [autoreload:trigger_reload] - /Users/liufan/program/PYTHON/TestLaboratoryGit/TestLaboratory/apps/user/views/userview.py changed, reloading. [INFO] [2022-10-06 11:30:02,606] [autoreload.py:637] [autoreload:run_with_reloader] - Watching for file changes with StatReloader [ERROR] [2022-10-06 11:30:05,527] [userview.py:56] [userview:post] - 用户名已存在,请修改用户名 [ERROR] [2022-10-06 11:30:05,528] [log.py:224] [log:log_response] - Internal Server Error: /api/v1/users/TestLaboratory_V1_User_5/edit [ERROR] [2022-10-06 11:30:05,528] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/users/TestLaboratory_V1_User_5/edit HTTP/1.1" 500 39 [INFO] [2022-10-06 11:30:12,244] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/users/TestLaboratory_V1_User_5/edit HTTP/1.1" 200 15 [INFO] [2022-10-06 11:30:31,858] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/users/TestLaboratory_V1_User_6 HTTP/1.1" 200 67 [ERROR] [2022-10-06 11:31:17,763] [userlistview.py:94] [userlistview:post] - 用户名或密码错误 [ERROR] [2022-10-06 11:31:17,764] [log.py:224] [log:log_response] - Internal Server Error: /api/v1/users/login [ERROR] [2022-10-06 11:31:17,765] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/users/login HTTP/1.1" 500 24 [INFO] [2022-10-06 11:31:26,287] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/users/login HTTP/1.1" 200 307 [INFO] [2022-10-06 11:31:29,886] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/users/%0A HTTP/1.1" 200 622 [INFO] [2022-10-06 11:31:34,608] [basehttp.py:161] [basehttp:log_message] - "GET /api/v1/users/TestLaboratory_V1_User_6 HTTP/1.1" 200 67 [ERROR] [2022-10-06 11:31:40,214] [userview.py:56] [userview:post] - 用户名已存在,请修改用户名 [ERROR] [2022-10-06 11:31:40,215] [log.py:224] [log:log_response] - Internal Server Error: /api/v1/users/TestLaboratory_V1_User_5/edit [ERROR] [2022-10-06 11:31:40,215] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/users/TestLaboratory_V1_User_5/edit HTTP/1.1" 500 39 [INFO] [2022-10-06 11:31:44,583] [basehttp.py:161] [basehttp:log_message] - "POST /api/v1/users/TestLaboratory_V1_User_5/edit HTTP/1.1" 200 15