168 | | Traceback (most recent call last): |
169 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 486, in thread_handler |
170 | | raise exc_info[1] |
171 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 43, in inner |
172 | | response = await get_response(request) |
173 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
174 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\deprecation.py", line 152, in __acall__ |
175 | | response = response or await self.get_response(request) |
176 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
177 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 45, in inner |
178 | | response = await sync_to_async( |
179 | | ^^^^^^^^^^^^^^^^^^^^ |
180 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 448, in __call__ |
181 | | ret = await asyncio.wait_for(future, timeout=None) |
182 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
183 | | File "C:\Program Files\Python311\Lib\asyncio\tasks.py", line 442, in wait_for |
184 | | return await fut |
185 | | ^^^^^^^^^ |
186 | | File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run |
187 | | result = self.fn(*self.args, **self.kwargs) |
188 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
189 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 488, in thread_handler |
190 | | return func(*args, **kwargs) |
191 | | ^^^^^^^^^^^^^^^^^^^^^ |
192 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 141, in response_for_exception |
193 | | response = handle_uncaught_exception( |
194 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
195 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 182, in handle_uncaught_exception |
196 | | return debug.technical_500_response(request, *exc_info) |
197 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
198 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 66, in technical_500_response |
199 | | html = reporter.get_traceback_html() |
200 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
201 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 396, in get_traceback_html |
202 | | c = Context(self.get_traceback_data(), use_l10n=False) |
203 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
204 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 381, in get_traceback_data |
205 | | c["raising_view_name"] = get_caller(self.request) |
206 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
207 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 99, in get_caller |
208 | | resolver_match = resolve(request.path) |
209 | | ^^^^^^^^^^^^^^^^^^^^^ |
210 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\base.py", line 24, in resolve |
211 | | return get_resolver(urlconf).resolve(path) |
212 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
213 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 663, in resolve |
214 | | for pattern in self.url_patterns: |
215 | | ^^^^^^^^^^^^^^^^^ |
216 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
217 | | res = instance.__dict__[self.name] = self.func(instance) |
218 | | ^^^^^^^^^^^^^^^^^^^ |
219 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns |
220 | | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
221 | | ^^^^^^^^^^^^^^^^^^^ |
222 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
223 | | res = instance.__dict__[self.name] = self.func(instance) |
224 | | ^^^^^^^^^^^^^^^^^^^ |
225 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module |
226 | | return import_module(self.urlconf_name) |
227 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
228 | | File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module |
229 | | return _bootstrap._gcd_import(name[level:], package, level) |
230 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
231 | | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import |
232 | | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load |
233 | | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked |
234 | | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked |
235 | | File "<frozen importlib._bootstrap_external>", line 940, in exec_module |
236 | | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed |
237 | | File "C:\code\myproject\myproject\urls.py", line 8, in <module> |
238 | | path('test/', TestView.as_view()), |
239 | | ^^^^^^^^^^^^^^^^^^ |
240 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 119, in as_view |
241 | | if cls.view_is_async: |
242 | | ^^^^^^^^^^^^^^^^^ |
243 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 71, in __get__ |
244 | | return self.fget(cls) |
245 | | ^^^^^^^^^^^^^^ |
246 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 73, in view_is_async |
247 | | raise ImproperlyConfigured( |
248 | | django.core.exceptions.ImproperlyConfigured: TestView HTTP handlers must either be all sync or all async. |
249 | | |
250 | | During handling of the above exception, another exception occurred: |
251 | | |
252 | | Traceback (most recent call last): |
253 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 486, in thread_handler |
254 | | raise exc_info[1] |
255 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 43, in inner |
256 | | response = await get_response(request) |
257 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
258 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\deprecation.py", line 152, in __acall__ |
259 | | response = response or await self.get_response(request) |
260 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
261 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 45, in inner |
262 | | response = await sync_to_async( |
263 | | ^^^^^^^^^^^^^^^^^^^^ |
264 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 448, in __call__ |
265 | | ret = await asyncio.wait_for(future, timeout=None) |
266 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
267 | | File "C:\Program Files\Python311\Lib\asyncio\tasks.py", line 442, in wait_for |
268 | | return await fut |
269 | | ^^^^^^^^^ |
270 | | File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run |
271 | | result = self.fn(*self.args, **self.kwargs) |
272 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
273 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 488, in thread_handler |
274 | | return func(*args, **kwargs) |
275 | | ^^^^^^^^^^^^^^^^^^^^^ |
276 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 141, in response_for_exception |
277 | | response = handle_uncaught_exception( |
278 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
279 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 182, in handle_uncaught_exception |
280 | | return debug.technical_500_response(request, *exc_info) |
281 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
282 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 66, in technical_500_response |
283 | | html = reporter.get_traceback_html() |
284 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
285 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 396, in get_traceback_html |
286 | | c = Context(self.get_traceback_data(), use_l10n=False) |
287 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
288 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 381, in get_traceback_data |
289 | | c["raising_view_name"] = get_caller(self.request) |
290 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
291 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 99, in get_caller |
292 | | resolver_match = resolve(request.path) |
293 | | ^^^^^^^^^^^^^^^^^^^^^ |
294 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\base.py", line 24, in resolve |
295 | | return get_resolver(urlconf).resolve(path) |
296 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
297 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 663, in resolve |
298 | | for pattern in self.url_patterns: |
299 | | ^^^^^^^^^^^^^^^^^ |
300 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
301 | | res = instance.__dict__[self.name] = self.func(instance) |
302 | | ^^^^^^^^^^^^^^^^^^^ |
303 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns |
304 | | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
305 | | ^^^^^^^^^^^^^^^^^^^ |
306 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
307 | | res = instance.__dict__[self.name] = self.func(instance) |
308 | | ^^^^^^^^^^^^^^^^^^^ |
309 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module |
310 | | return import_module(self.urlconf_name) |
311 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
312 | | File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module |
313 | | return _bootstrap._gcd_import(name[level:], package, level) |
314 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
315 | | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import |
316 | | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load |
317 | | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked |
318 | | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked |
319 | | File "<frozen importlib._bootstrap_external>", line 940, in exec_module |
320 | | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed |
321 | | File "C:\code\myproject\myproject\urls.py", line 8, in <module> |
322 | | path('test/', TestView.as_view()), |
323 | | ^^^^^^^^^^^^^^^^^^ |
324 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 119, in as_view |
325 | | if cls.view_is_async: |
326 | | ^^^^^^^^^^^^^^^^^ |
327 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 71, in __get__ |
328 | | return self.fget(cls) |
329 | | ^^^^^^^^^^^^^^ |
330 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 73, in view_is_async |
331 | | raise ImproperlyConfigured( |
332 | | django.core.exceptions.ImproperlyConfigured: TestView HTTP handlers must either be all sync or all async. |
333 | | |
334 | | During handling of the above exception, another exception occurred: |
335 | | |
336 | | Traceback (most recent call last): |
337 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 486, in thread_handler |
338 | | raise exc_info[1] |
339 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 43, in inner |
340 | | response = await get_response(request) |
341 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
342 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\deprecation.py", line 152, in __acall__ |
343 | | response = response or await self.get_response(request) |
344 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
345 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 45, in inner |
346 | | response = await sync_to_async( |
347 | | ^^^^^^^^^^^^^^^^^^^^ |
348 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 448, in __call__ |
349 | | ret = await asyncio.wait_for(future, timeout=None) |
350 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
351 | | File "C:\Program Files\Python311\Lib\asyncio\tasks.py", line 442, in wait_for |
352 | | return await fut |
353 | | ^^^^^^^^^ |
354 | | File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run |
355 | | result = self.fn(*self.args, **self.kwargs) |
356 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
357 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 488, in thread_handler |
358 | | return func(*args, **kwargs) |
359 | | ^^^^^^^^^^^^^^^^^^^^^ |
360 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 141, in response_for_exception |
361 | | response = handle_uncaught_exception( |
362 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
363 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 182, in handle_uncaught_exception |
364 | | return debug.technical_500_response(request, *exc_info) |
365 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
366 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 66, in technical_500_response |
367 | | html = reporter.get_traceback_html() |
368 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
369 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 396, in get_traceback_html |
370 | | c = Context(self.get_traceback_data(), use_l10n=False) |
371 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
372 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 381, in get_traceback_data |
373 | | c["raising_view_name"] = get_caller(self.request) |
374 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
375 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 99, in get_caller |
376 | | resolver_match = resolve(request.path) |
377 | | ^^^^^^^^^^^^^^^^^^^^^ |
378 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\base.py", line 24, in resolve |
379 | | return get_resolver(urlconf).resolve(path) |
380 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
381 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 663, in resolve |
382 | | for pattern in self.url_patterns: |
383 | | ^^^^^^^^^^^^^^^^^ |
384 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
385 | | res = instance.__dict__[self.name] = self.func(instance) |
386 | | ^^^^^^^^^^^^^^^^^^^ |
387 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns |
388 | | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
389 | | ^^^^^^^^^^^^^^^^^^^ |
390 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
391 | | res = instance.__dict__[self.name] = self.func(instance) |
392 | | ^^^^^^^^^^^^^^^^^^^ |
393 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module |
394 | | return import_module(self.urlconf_name) |
395 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
396 | | File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module |
397 | | return _bootstrap._gcd_import(name[level:], package, level) |
398 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
399 | | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import |
400 | | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load |
401 | | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked |
402 | | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked |
403 | | File "<frozen importlib._bootstrap_external>", line 940, in exec_module |
404 | | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed |
405 | | File "C:\code\myproject\myproject\urls.py", line 8, in <module> |
406 | | path('test/', TestView.as_view()), |
407 | | ^^^^^^^^^^^^^^^^^^ |
408 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 119, in as_view |
409 | | if cls.view_is_async: |
410 | | ^^^^^^^^^^^^^^^^^ |
411 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 71, in __get__ |
412 | | return self.fget(cls) |
413 | | ^^^^^^^^^^^^^^ |
414 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 73, in view_is_async |
415 | | raise ImproperlyConfigured( |
416 | | django.core.exceptions.ImproperlyConfigured: TestView HTTP handlers must either be all sync or all async. |
417 | | |
418 | | During handling of the above exception, another exception occurred: |
419 | | |
420 | | Traceback (most recent call last): |
421 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 486, in thread_handler |
422 | | raise exc_info[1] |
423 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 43, in inner |
424 | | response = await get_response(request) |
425 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
426 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\deprecation.py", line 152, in __acall__ |
427 | | response = response or await self.get_response(request) |
428 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
429 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 45, in inner |
430 | | response = await sync_to_async( |
431 | | ^^^^^^^^^^^^^^^^^^^^ |
432 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 448, in __call__ |
433 | | ret = await asyncio.wait_for(future, timeout=None) |
434 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
435 | | File "C:\Program Files\Python311\Lib\asyncio\tasks.py", line 442, in wait_for |
436 | | return await fut |
437 | | ^^^^^^^^^ |
438 | | File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run |
439 | | result = self.fn(*self.args, **self.kwargs) |
440 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
441 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 488, in thread_handler |
442 | | return func(*args, **kwargs) |
443 | | ^^^^^^^^^^^^^^^^^^^^^ |
444 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 141, in response_for_exception |
445 | | response = handle_uncaught_exception( |
446 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
447 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 182, in handle_uncaught_exception |
448 | | return debug.technical_500_response(request, *exc_info) |
449 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
450 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 66, in technical_500_response |
451 | | html = reporter.get_traceback_html() |
452 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
453 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 396, in get_traceback_html |
454 | | c = Context(self.get_traceback_data(), use_l10n=False) |
455 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
456 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 381, in get_traceback_data |
457 | | c["raising_view_name"] = get_caller(self.request) |
458 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
459 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 99, in get_caller |
460 | | resolver_match = resolve(request.path) |
461 | | ^^^^^^^^^^^^^^^^^^^^^ |
462 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\base.py", line 24, in resolve |
463 | | return get_resolver(urlconf).resolve(path) |
464 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
465 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 663, in resolve |
466 | | for pattern in self.url_patterns: |
467 | | ^^^^^^^^^^^^^^^^^ |
468 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
469 | | res = instance.__dict__[self.name] = self.func(instance) |
470 | | ^^^^^^^^^^^^^^^^^^^ |
471 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns |
472 | | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
473 | | ^^^^^^^^^^^^^^^^^^^ |
474 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
475 | | res = instance.__dict__[self.name] = self.func(instance) |
476 | | ^^^^^^^^^^^^^^^^^^^ |
477 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module |
478 | | return import_module(self.urlconf_name) |
479 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
480 | | File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module |
481 | | return _bootstrap._gcd_import(name[level:], package, level) |
482 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
483 | | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import |
484 | | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load |
485 | | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked |
486 | | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked |
487 | | File "<frozen importlib._bootstrap_external>", line 940, in exec_module |
488 | | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed |
489 | | File "C:\code\myproject\myproject\urls.py", line 8, in <module> |
490 | | path('test/', TestView.as_view()), |
491 | | ^^^^^^^^^^^^^^^^^^ |
492 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 119, in as_view |
493 | | if cls.view_is_async: |
494 | | ^^^^^^^^^^^^^^^^^ |
495 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 71, in __get__ |
496 | | return self.fget(cls) |
497 | | ^^^^^^^^^^^^^^ |
498 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 73, in view_is_async |
499 | | raise ImproperlyConfigured( |
500 | | django.core.exceptions.ImproperlyConfigured: TestView HTTP handlers must either be all sync or all async. |
501 | | |
502 | | During handling of the above exception, another exception occurred: |
503 | | |
504 | | Traceback (most recent call last): |
505 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 486, in thread_handler |
506 | | raise exc_info[1] |
507 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 43, in inner |
508 | | response = await get_response(request) |
509 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
510 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\deprecation.py", line 152, in __acall__ |
511 | | response = response or await self.get_response(request) |
512 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
513 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 45, in inner |
514 | | response = await sync_to_async( |
515 | | ^^^^^^^^^^^^^^^^^^^^ |
516 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 448, in __call__ |
517 | | ret = await asyncio.wait_for(future, timeout=None) |
518 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
519 | | File "C:\Program Files\Python311\Lib\asyncio\tasks.py", line 442, in wait_for |
520 | | return await fut |
521 | | ^^^^^^^^^ |
522 | | File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run |
523 | | result = self.fn(*self.args, **self.kwargs) |
524 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
525 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 488, in thread_handler |
526 | | return func(*args, **kwargs) |
527 | | ^^^^^^^^^^^^^^^^^^^^^ |
528 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 141, in response_for_exception |
529 | | response = handle_uncaught_exception( |
530 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
531 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 182, in handle_uncaught_exception |
532 | | return debug.technical_500_response(request, *exc_info) |
533 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
534 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 66, in technical_500_response |
535 | | html = reporter.get_traceback_html() |
536 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
537 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 396, in get_traceback_html |
538 | | c = Context(self.get_traceback_data(), use_l10n=False) |
539 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
540 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 381, in get_traceback_data |
541 | | c["raising_view_name"] = get_caller(self.request) |
542 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
543 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 99, in get_caller |
544 | | resolver_match = resolve(request.path) |
545 | | ^^^^^^^^^^^^^^^^^^^^^ |
546 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\base.py", line 24, in resolve |
547 | | return get_resolver(urlconf).resolve(path) |
548 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
549 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 663, in resolve |
550 | | for pattern in self.url_patterns: |
551 | | ^^^^^^^^^^^^^^^^^ |
552 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
553 | | res = instance.__dict__[self.name] = self.func(instance) |
554 | | ^^^^^^^^^^^^^^^^^^^ |
555 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns |
556 | | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
557 | | ^^^^^^^^^^^^^^^^^^^ |
558 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
559 | | res = instance.__dict__[self.name] = self.func(instance) |
560 | | ^^^^^^^^^^^^^^^^^^^ |
561 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module |
562 | | return import_module(self.urlconf_name) |
563 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
564 | | File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module |
565 | | return _bootstrap._gcd_import(name[level:], package, level) |
566 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
567 | | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import |
568 | | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load |
569 | | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked |
570 | | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked |
571 | | File "<frozen importlib._bootstrap_external>", line 940, in exec_module |
572 | | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed |
573 | | File "C:\code\myproject\myproject\urls.py", line 8, in <module> |
574 | | path('test/', TestView.as_view()), |
575 | | ^^^^^^^^^^^^^^^^^^ |
576 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 119, in as_view |
577 | | if cls.view_is_async: |
578 | | ^^^^^^^^^^^^^^^^^ |
579 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 71, in __get__ |
580 | | return self.fget(cls) |
581 | | ^^^^^^^^^^^^^^ |
582 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 73, in view_is_async |
583 | | raise ImproperlyConfigured( |
584 | | django.core.exceptions.ImproperlyConfigured: TestView HTTP handlers must either be all sync or all async. |
585 | | |
586 | | During handling of the above exception, another exception occurred: |
587 | | |
588 | | Traceback (most recent call last): |
589 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 486, in thread_handler |
590 | | raise exc_info[1] |
591 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 43, in inner |
592 | | response = await get_response(request) |
593 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
594 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\deprecation.py", line 152, in __acall__ |
595 | | response = response or await self.get_response(request) |
596 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
597 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 45, in inner |
598 | | response = await sync_to_async( |
599 | | ^^^^^^^^^^^^^^^^^^^^ |
600 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 448, in __call__ |
601 | | ret = await asyncio.wait_for(future, timeout=None) |
602 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
603 | | File "C:\Program Files\Python311\Lib\asyncio\tasks.py", line 442, in wait_for |
604 | | return await fut |
605 | | ^^^^^^^^^ |
606 | | File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run |
607 | | result = self.fn(*self.args, **self.kwargs) |
608 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
609 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 488, in thread_handler |
610 | | return func(*args, **kwargs) |
611 | | ^^^^^^^^^^^^^^^^^^^^^ |
612 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 141, in response_for_exception |
613 | | response = handle_uncaught_exception( |
614 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
615 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 182, in handle_uncaught_exception |
616 | | return debug.technical_500_response(request, *exc_info) |
617 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
618 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 66, in technical_500_response |
619 | | html = reporter.get_traceback_html() |
620 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
621 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 396, in get_traceback_html |
622 | | c = Context(self.get_traceback_data(), use_l10n=False) |
623 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
624 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 381, in get_traceback_data |
625 | | c["raising_view_name"] = get_caller(self.request) |
626 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
627 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 99, in get_caller |
628 | | resolver_match = resolve(request.path) |
629 | | ^^^^^^^^^^^^^^^^^^^^^ |
630 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\base.py", line 24, in resolve |
631 | | return get_resolver(urlconf).resolve(path) |
632 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
633 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 663, in resolve |
634 | | for pattern in self.url_patterns: |
635 | | ^^^^^^^^^^^^^^^^^ |
636 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
637 | | res = instance.__dict__[self.name] = self.func(instance) |
638 | | ^^^^^^^^^^^^^^^^^^^ |
639 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns |
640 | | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
641 | | ^^^^^^^^^^^^^^^^^^^ |
642 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
643 | | res = instance.__dict__[self.name] = self.func(instance) |
644 | | ^^^^^^^^^^^^^^^^^^^ |
645 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module |
646 | | return import_module(self.urlconf_name) |
647 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
648 | | File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module |
649 | | return _bootstrap._gcd_import(name[level:], package, level) |
650 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
651 | | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import |
652 | | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load |
653 | | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked |
654 | | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked |
655 | | File "<frozen importlib._bootstrap_external>", line 940, in exec_module |
656 | | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed |
657 | | File "C:\code\myproject\myproject\urls.py", line 8, in <module> |
658 | | path('test/', TestView.as_view()), |
659 | | ^^^^^^^^^^^^^^^^^^ |
660 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 119, in as_view |
661 | | if cls.view_is_async: |
662 | | ^^^^^^^^^^^^^^^^^ |
663 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 71, in __get__ |
664 | | return self.fget(cls) |
665 | | ^^^^^^^^^^^^^^ |
666 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 73, in view_is_async |
667 | | raise ImproperlyConfigured( |
668 | | django.core.exceptions.ImproperlyConfigured: TestView HTTP handlers must either be all sync or all async. |
669 | | |
670 | | During handling of the above exception, another exception occurred: |
671 | | |
672 | | Traceback (most recent call last): |
673 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 486, in thread_handler |
674 | | raise exc_info[1] |
675 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 43, in inner |
676 | | response = await get_response(request) |
677 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
678 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\deprecation.py", line 152, in __acall__ |
679 | | response = response or await self.get_response(request) |
680 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
681 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 45, in inner |
682 | | response = await sync_to_async( |
683 | | ^^^^^^^^^^^^^^^^^^^^ |
684 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 448, in __call__ |
685 | | ret = await asyncio.wait_for(future, timeout=None) |
686 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
687 | | File "C:\Program Files\Python311\Lib\asyncio\tasks.py", line 442, in wait_for |
688 | | return await fut |
689 | | ^^^^^^^^^ |
690 | | File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run |
691 | | result = self.fn(*self.args, **self.kwargs) |
692 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
693 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 488, in thread_handler |
694 | | return func(*args, **kwargs) |
695 | | ^^^^^^^^^^^^^^^^^^^^^ |
696 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 141, in response_for_exception |
697 | | response = handle_uncaught_exception( |
698 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
699 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 182, in handle_uncaught_exception |
700 | | return debug.technical_500_response(request, *exc_info) |
701 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
702 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 66, in technical_500_response |
703 | | html = reporter.get_traceback_html() |
704 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
705 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 396, in get_traceback_html |
706 | | c = Context(self.get_traceback_data(), use_l10n=False) |
707 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
708 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 381, in get_traceback_data |
709 | | c["raising_view_name"] = get_caller(self.request) |
710 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
711 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 99, in get_caller |
712 | | resolver_match = resolve(request.path) |
713 | | ^^^^^^^^^^^^^^^^^^^^^ |
714 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\base.py", line 24, in resolve |
715 | | return get_resolver(urlconf).resolve(path) |
716 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
717 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 663, in resolve |
718 | | for pattern in self.url_patterns: |
719 | | ^^^^^^^^^^^^^^^^^ |
720 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
721 | | res = instance.__dict__[self.name] = self.func(instance) |
722 | | ^^^^^^^^^^^^^^^^^^^ |
723 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns |
724 | | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
725 | | ^^^^^^^^^^^^^^^^^^^ |
726 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
727 | | res = instance.__dict__[self.name] = self.func(instance) |
728 | | ^^^^^^^^^^^^^^^^^^^ |
729 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module |
730 | | return import_module(self.urlconf_name) |
731 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
732 | | File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module |
733 | | return _bootstrap._gcd_import(name[level:], package, level) |
734 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
735 | | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import |
736 | | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load |
737 | | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked |
738 | | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked |
739 | | File "<frozen importlib._bootstrap_external>", line 940, in exec_module |
740 | | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed |
741 | | File "C:\code\myproject\myproject\urls.py", line 8, in <module> |
742 | | path('test/', TestView.as_view()), |
743 | | ^^^^^^^^^^^^^^^^^^ |
744 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 119, in as_view |
745 | | if cls.view_is_async: |
746 | | ^^^^^^^^^^^^^^^^^ |
747 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 71, in __get__ |
748 | | return self.fget(cls) |
749 | | ^^^^^^^^^^^^^^ |
750 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 73, in view_is_async |
751 | | raise ImproperlyConfigured( |
752 | | django.core.exceptions.ImproperlyConfigured: TestView HTTP handlers must either be all sync or all async. |
753 | | |
754 | | During handling of the above exception, another exception occurred: |
755 | | |
756 | | Traceback (most recent call last): |
757 | | File "C:\code\myproject\venv\Lib\site-packages\hypercorn\asyncio\task_group.py", line 23, in _handle |
758 | | await app(scope, receive, send, sync_spawn, call_soon) |
759 | | File "C:\code\myproject\venv\Lib\site-packages\hypercorn\app_wrappers.py", line 33, in __call__ |
760 | | await self.app(scope, receive, send) |
761 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\asgi.py", line 155, in __call__ |
762 | | await self.handle(scope, receive, send) |
763 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\asgi.py", line 178, in handle |
764 | | response = await self.get_response_async(request) |
765 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
766 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\base.py", line 162, in get_response_async |
767 | | response = await self._middleware_chain(request) |
768 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
769 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 45, in inner |
770 | | response = await sync_to_async( |
771 | | ^^^^^^^^^^^^^^^^^^^^ |
772 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 448, in __call__ |
773 | | ret = await asyncio.wait_for(future, timeout=None) |
774 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
775 | | File "C:\Program Files\Python311\Lib\asyncio\tasks.py", line 442, in wait_for |
776 | | return await fut |
777 | | ^^^^^^^^^ |
778 | | File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run |
779 | | result = self.fn(*self.args, **self.kwargs) |
780 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
781 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 488, in thread_handler |
782 | | return func(*args, **kwargs) |
783 | | ^^^^^^^^^^^^^^^^^^^^^ |
784 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 141, in response_for_exception |
785 | | response = handle_uncaught_exception( |
786 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
787 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 182, in handle_uncaught_exception |
788 | | return debug.technical_500_response(request, *exc_info) |
789 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
790 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 66, in technical_500_response |
791 | | html = reporter.get_traceback_html() |
792 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
793 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 396, in get_traceback_html |
794 | | c = Context(self.get_traceback_data(), use_l10n=False) |
795 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
796 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 381, in get_traceback_data |
797 | | c["raising_view_name"] = get_caller(self.request) |
798 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
799 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 99, in get_caller |
800 | | resolver_match = resolve(request.path) |
801 | | ^^^^^^^^^^^^^^^^^^^^^ |
802 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\base.py", line 24, in resolve |
803 | | return get_resolver(urlconf).resolve(path) |
804 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
805 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 663, in resolve |
806 | | for pattern in self.url_patterns: |
807 | | ^^^^^^^^^^^^^^^^^ |
808 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
809 | | res = instance.__dict__[self.name] = self.func(instance) |
810 | | ^^^^^^^^^^^^^^^^^^^ |
811 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns |
812 | | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
813 | | ^^^^^^^^^^^^^^^^^^^ |
814 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
815 | | res = instance.__dict__[self.name] = self.func(instance) |
816 | | ^^^^^^^^^^^^^^^^^^^ |
817 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module |
818 | | return import_module(self.urlconf_name) |
819 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
820 | | File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module |
821 | | return _bootstrap._gcd_import(name[level:], package, level) |
822 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
823 | | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import |
824 | | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load |
825 | | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked |
826 | | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked |
827 | | File "<frozen importlib._bootstrap_external>", line 940, in exec_module |
828 | | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed |
829 | | File "C:\code\myproject\myproject\urls.py", line 8, in <module> |
830 | | path('test/', TestView.as_view()), |
831 | | ^^^^^^^^^^^^^^^^^^ |
832 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 119, in as_view |
833 | | if cls.view_is_async: |
834 | | ^^^^^^^^^^^^^^^^^ |
835 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 71, in __get__ |
836 | | return self.fget(cls) |
837 | | ^^^^^^^^^^^^^^ |
838 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 73, in view_is_async |
839 | | raise ImproperlyConfigured( |
840 | | django.core.exceptions.ImproperlyConfigured: TestView HTTP handlers must either be all sync or all async. |
841 | | [2023-03-31 11:54:12 +0200] [16000] [ERROR] Error in ASGI Framework |
842 | | Traceback (most recent call last): |
843 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 486, in thread_handler |
844 | | raise exc_info[1] |
845 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 43, in inner |
846 | | response = await get_response(request) |
847 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
848 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\base.py", line 235, in _get_response_async |
849 | | callback, callback_args, callback_kwargs = self.resolve_request(request) |
850 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
851 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\base.py", line 313, in resolve_request |
852 | | resolver_match = resolver.resolve(request.path_info) |
853 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
854 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 663, in resolve |
855 | | for pattern in self.url_patterns: |
856 | | ^^^^^^^^^^^^^^^^^ |
857 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
858 | | res = instance.__dict__[self.name] = self.func(instance) |
859 | | ^^^^^^^^^^^^^^^^^^^ |
860 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns |
861 | | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
862 | | ^^^^^^^^^^^^^^^^^^^ |
863 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
864 | | res = instance.__dict__[self.name] = self.func(instance) |
865 | | ^^^^^^^^^^^^^^^^^^^ |
866 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module |
867 | | return import_module(self.urlconf_name) |
868 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
869 | | File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module |
870 | | return _bootstrap._gcd_import(name[level:], package, level) |
871 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
872 | | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import |
873 | | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load |
874 | | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked |
875 | | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked |
876 | | File "<frozen importlib._bootstrap_external>", line 940, in exec_module |
877 | | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed |
878 | | File "C:\code\myproject\myproject\urls.py", line 8, in <module> |
879 | | path('test/', TestView.as_view()), |
880 | | ^^^^^^^^^^^^^^^^^^ |
881 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 119, in as_view |
882 | | if cls.view_is_async: |
883 | | ^^^^^^^^^^^^^^^^^ |
884 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 71, in __get__ |
885 | | return self.fget(cls) |
886 | | ^^^^^^^^^^^^^^ |
887 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 73, in view_is_async |
888 | | raise ImproperlyConfigured( |
889 | | django.core.exceptions.ImproperlyConfigured: TestView HTTP handlers must either be all sync or all async. |
890 | | |
891 | | During handling of the above exception, another exception occurred: |
892 | | |
893 | | Traceback (most recent call last): |
894 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 486, in thread_handler |
895 | | raise exc_info[1] |
896 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 43, in inner |
897 | | response = await get_response(request) |
898 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
899 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\deprecation.py", line 152, in __acall__ |
900 | | response = response or await self.get_response(request) |
901 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
902 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 45, in inner |
903 | | response = await sync_to_async( |
904 | | ^^^^^^^^^^^^^^^^^^^^ |
905 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 448, in __call__ |
906 | | ret = await asyncio.wait_for(future, timeout=None) |
907 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
908 | | File "C:\Program Files\Python311\Lib\asyncio\tasks.py", line 442, in wait_for |
909 | | return await fut |
910 | | ^^^^^^^^^ |
911 | | File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run |
912 | | result = self.fn(*self.args, **self.kwargs) |
913 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
914 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 488, in thread_handler |
915 | | return func(*args, **kwargs) |
916 | | ^^^^^^^^^^^^^^^^^^^^^ |
917 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 141, in response_for_exception |
918 | | response = handle_uncaught_exception( |
919 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
920 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 182, in handle_uncaught_exception |
921 | | return debug.technical_500_response(request, *exc_info) |
922 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
923 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 66, in technical_500_response |
924 | | html = reporter.get_traceback_html() |
925 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
926 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 396, in get_traceback_html |
927 | | c = Context(self.get_traceback_data(), use_l10n=False) |
928 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
929 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 381, in get_traceback_data |
930 | | c["raising_view_name"] = get_caller(self.request) |
931 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
932 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 99, in get_caller |
933 | | resolver_match = resolve(request.path) |
934 | | ^^^^^^^^^^^^^^^^^^^^^ |
935 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\base.py", line 24, in resolve |
936 | | return get_resolver(urlconf).resolve(path) |
937 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
938 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 663, in resolve |
939 | | for pattern in self.url_patterns: |
940 | | ^^^^^^^^^^^^^^^^^ |
941 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
942 | | res = instance.__dict__[self.name] = self.func(instance) |
943 | | ^^^^^^^^^^^^^^^^^^^ |
944 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns |
945 | | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
946 | | ^^^^^^^^^^^^^^^^^^^ |
947 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
948 | | res = instance.__dict__[self.name] = self.func(instance) |
949 | | ^^^^^^^^^^^^^^^^^^^ |
950 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module |
951 | | return import_module(self.urlconf_name) |
952 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
953 | | File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module |
954 | | return _bootstrap._gcd_import(name[level:], package, level) |
955 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
956 | | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import |
957 | | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load |
958 | | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked |
959 | | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked |
960 | | File "<frozen importlib._bootstrap_external>", line 940, in exec_module |
961 | | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed |
962 | | File "C:\code\myproject\myproject\urls.py", line 8, in <module> |
963 | | path('test/', TestView.as_view()), |
964 | | ^^^^^^^^^^^^^^^^^^ |
965 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 119, in as_view |
966 | | if cls.view_is_async: |
967 | | ^^^^^^^^^^^^^^^^^ |
968 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 71, in __get__ |
969 | | return self.fget(cls) |
970 | | ^^^^^^^^^^^^^^ |
971 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 73, in view_is_async |
972 | | raise ImproperlyConfigured( |
973 | | django.core.exceptions.ImproperlyConfigured: TestView HTTP handlers must either be all sync or all async. |
974 | | |
975 | | During handling of the above exception, another exception occurred: |
976 | | |
977 | | Traceback (most recent call last): |
978 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 486, in thread_handler |
979 | | raise exc_info[1] |
980 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 43, in inner |
981 | | response = await get_response(request) |
982 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
983 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\deprecation.py", line 152, in __acall__ |
984 | | response = response or await self.get_response(request) |
985 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
986 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 45, in inner |
987 | | response = await sync_to_async( |
988 | | ^^^^^^^^^^^^^^^^^^^^ |
989 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 448, in __call__ |
990 | | ret = await asyncio.wait_for(future, timeout=None) |
991 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
992 | | File "C:\Program Files\Python311\Lib\asyncio\tasks.py", line 442, in wait_for |
993 | | return await fut |
994 | | ^^^^^^^^^ |
995 | | File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run |
996 | | result = self.fn(*self.args, **self.kwargs) |
997 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
998 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 488, in thread_handler |
999 | | return func(*args, **kwargs) |
1000 | | ^^^^^^^^^^^^^^^^^^^^^ |
1001 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 141, in response_for_exception |
1002 | | response = handle_uncaught_exception( |
1003 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1004 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 182, in handle_uncaught_exception |
1005 | | return debug.technical_500_response(request, *exc_info) |
1006 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1007 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 66, in technical_500_response |
1008 | | html = reporter.get_traceback_html() |
1009 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1010 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 396, in get_traceback_html |
1011 | | c = Context(self.get_traceback_data(), use_l10n=False) |
1012 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
1013 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 381, in get_traceback_data |
1014 | | c["raising_view_name"] = get_caller(self.request) |
1015 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
1016 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 99, in get_caller |
1017 | | resolver_match = resolve(request.path) |
1018 | | ^^^^^^^^^^^^^^^^^^^^^ |
1019 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\base.py", line 24, in resolve |
1020 | | return get_resolver(urlconf).resolve(path) |
1021 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1022 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 663, in resolve |
1023 | | for pattern in self.url_patterns: |
1024 | | ^^^^^^^^^^^^^^^^^ |
1025 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
1026 | | res = instance.__dict__[self.name] = self.func(instance) |
1027 | | ^^^^^^^^^^^^^^^^^^^ |
1028 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns |
1029 | | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
1030 | | ^^^^^^^^^^^^^^^^^^^ |
1031 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
1032 | | res = instance.__dict__[self.name] = self.func(instance) |
1033 | | ^^^^^^^^^^^^^^^^^^^ |
1034 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module |
1035 | | return import_module(self.urlconf_name) |
1036 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1037 | | File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module |
1038 | | return _bootstrap._gcd_import(name[level:], package, level) |
1039 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1040 | | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import |
1041 | | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load |
1042 | | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked |
1043 | | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked |
1044 | | File "<frozen importlib._bootstrap_external>", line 940, in exec_module |
1045 | | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed |
1046 | | File "C:\code\myproject\myproject\urls.py", line 8, in <module> |
1047 | | path('test/', TestView.as_view()), |
1048 | | ^^^^^^^^^^^^^^^^^^ |
1049 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 119, in as_view |
1050 | | if cls.view_is_async: |
1051 | | ^^^^^^^^^^^^^^^^^ |
1052 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 71, in __get__ |
1053 | | return self.fget(cls) |
1054 | | ^^^^^^^^^^^^^^ |
1055 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 73, in view_is_async |
1056 | | raise ImproperlyConfigured( |
1057 | | django.core.exceptions.ImproperlyConfigured: TestView HTTP handlers must either be all sync or all async. |
1058 | | |
1059 | | During handling of the above exception, another exception occurred: |
1060 | | |
1061 | | Traceback (most recent call last): |
1062 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 486, in thread_handler |
1063 | | raise exc_info[1] |
1064 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 43, in inner |
1065 | | response = await get_response(request) |
1066 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1067 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\deprecation.py", line 152, in __acall__ |
1068 | | response = response or await self.get_response(request) |
1069 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1070 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 45, in inner |
1071 | | response = await sync_to_async( |
1072 | | ^^^^^^^^^^^^^^^^^^^^ |
1073 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 448, in __call__ |
1074 | | ret = await asyncio.wait_for(future, timeout=None) |
1075 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1076 | | File "C:\Program Files\Python311\Lib\asyncio\tasks.py", line 442, in wait_for |
1077 | | return await fut |
1078 | | ^^^^^^^^^ |
1079 | | File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run |
1080 | | result = self.fn(*self.args, **self.kwargs) |
1081 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1082 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 488, in thread_handler |
1083 | | return func(*args, **kwargs) |
1084 | | ^^^^^^^^^^^^^^^^^^^^^ |
1085 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 141, in response_for_exception |
1086 | | response = handle_uncaught_exception( |
1087 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1088 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 182, in handle_uncaught_exception |
1089 | | return debug.technical_500_response(request, *exc_info) |
1090 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1091 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 66, in technical_500_response |
1092 | | html = reporter.get_traceback_html() |
1093 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1094 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 396, in get_traceback_html |
1095 | | c = Context(self.get_traceback_data(), use_l10n=False) |
1096 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
1097 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 381, in get_traceback_data |
1098 | | c["raising_view_name"] = get_caller(self.request) |
1099 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
1100 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 99, in get_caller |
1101 | | resolver_match = resolve(request.path) |
1102 | | ^^^^^^^^^^^^^^^^^^^^^ |
1103 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\base.py", line 24, in resolve |
1104 | | return get_resolver(urlconf).resolve(path) |
1105 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1106 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 663, in resolve |
1107 | | for pattern in self.url_patterns: |
1108 | | ^^^^^^^^^^^^^^^^^ |
1109 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
1110 | | res = instance.__dict__[self.name] = self.func(instance) |
1111 | | ^^^^^^^^^^^^^^^^^^^ |
1112 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns |
1113 | | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
1114 | | ^^^^^^^^^^^^^^^^^^^ |
1115 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
1116 | | res = instance.__dict__[self.name] = self.func(instance) |
1117 | | ^^^^^^^^^^^^^^^^^^^ |
1118 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module |
1119 | | return import_module(self.urlconf_name) |
1120 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1121 | | File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module |
1122 | | return _bootstrap._gcd_import(name[level:], package, level) |
1123 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1124 | | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import |
1125 | | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load |
1126 | | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked |
1127 | | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked |
1128 | | File "<frozen importlib._bootstrap_external>", line 940, in exec_module |
1129 | | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed |
1130 | | File "C:\code\myproject\myproject\urls.py", line 8, in <module> |
1131 | | path('test/', TestView.as_view()), |
1132 | | ^^^^^^^^^^^^^^^^^^ |
1133 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 119, in as_view |
1134 | | if cls.view_is_async: |
1135 | | ^^^^^^^^^^^^^^^^^ |
1136 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 71, in __get__ |
1137 | | return self.fget(cls) |
1138 | | ^^^^^^^^^^^^^^ |
1139 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 73, in view_is_async |
1140 | | raise ImproperlyConfigured( |
1141 | | django.core.exceptions.ImproperlyConfigured: TestView HTTP handlers must either be all sync or all async. |
1142 | | |
1143 | | During handling of the above exception, another exception occurred: |
1144 | | |
1145 | | Traceback (most recent call last): |
1146 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 486, in thread_handler |
1147 | | raise exc_info[1] |
1148 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 43, in inner |
1149 | | response = await get_response(request) |
1150 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1151 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\deprecation.py", line 152, in __acall__ |
1152 | | response = response or await self.get_response(request) |
1153 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1154 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 45, in inner |
1155 | | response = await sync_to_async( |
1156 | | ^^^^^^^^^^^^^^^^^^^^ |
1157 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 448, in __call__ |
1158 | | ret = await asyncio.wait_for(future, timeout=None) |
1159 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1160 | | File "C:\Program Files\Python311\Lib\asyncio\tasks.py", line 442, in wait_for |
1161 | | return await fut |
1162 | | ^^^^^^^^^ |
1163 | | File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run |
1164 | | result = self.fn(*self.args, **self.kwargs) |
1165 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1166 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 488, in thread_handler |
1167 | | return func(*args, **kwargs) |
1168 | | ^^^^^^^^^^^^^^^^^^^^^ |
1169 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 141, in response_for_exception |
1170 | | response = handle_uncaught_exception( |
1171 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1172 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 182, in handle_uncaught_exception |
1173 | | return debug.technical_500_response(request, *exc_info) |
1174 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1175 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 66, in technical_500_response |
1176 | | html = reporter.get_traceback_html() |
1177 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1178 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 396, in get_traceback_html |
1179 | | c = Context(self.get_traceback_data(), use_l10n=False) |
1180 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
1181 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 381, in get_traceback_data |
1182 | | c["raising_view_name"] = get_caller(self.request) |
1183 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
1184 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 99, in get_caller |
1185 | | resolver_match = resolve(request.path) |
1186 | | ^^^^^^^^^^^^^^^^^^^^^ |
1187 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\base.py", line 24, in resolve |
1188 | | return get_resolver(urlconf).resolve(path) |
1189 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1190 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 663, in resolve |
1191 | | for pattern in self.url_patterns: |
1192 | | ^^^^^^^^^^^^^^^^^ |
1193 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
1194 | | res = instance.__dict__[self.name] = self.func(instance) |
1195 | | ^^^^^^^^^^^^^^^^^^^ |
1196 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns |
1197 | | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
1198 | | ^^^^^^^^^^^^^^^^^^^ |
1199 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
1200 | | res = instance.__dict__[self.name] = self.func(instance) |
1201 | | ^^^^^^^^^^^^^^^^^^^ |
1202 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module |
1203 | | return import_module(self.urlconf_name) |
1204 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1205 | | File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module |
1206 | | return _bootstrap._gcd_import(name[level:], package, level) |
1207 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1208 | | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import |
1209 | | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load |
1210 | | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked |
1211 | | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked |
1212 | | File "<frozen importlib._bootstrap_external>", line 940, in exec_module |
1213 | | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed |
1214 | | File "C:\code\myproject\myproject\urls.py", line 8, in <module> |
1215 | | path('test/', TestView.as_view()), |
1216 | | ^^^^^^^^^^^^^^^^^^ |
1217 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 119, in as_view |
1218 | | if cls.view_is_async: |
1219 | | ^^^^^^^^^^^^^^^^^ |
1220 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 71, in __get__ |
1221 | | return self.fget(cls) |
1222 | | ^^^^^^^^^^^^^^ |
1223 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 73, in view_is_async |
1224 | | raise ImproperlyConfigured( |
1225 | | django.core.exceptions.ImproperlyConfigured: TestView HTTP handlers must either be all sync or all async. |
1226 | | |
1227 | | During handling of the above exception, another exception occurred: |
1228 | | |
1229 | | Traceback (most recent call last): |
1230 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 486, in thread_handler |
1231 | | raise exc_info[1] |
1232 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 43, in inner |
1233 | | response = await get_response(request) |
1234 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1235 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\deprecation.py", line 152, in __acall__ |
1236 | | response = response or await self.get_response(request) |
1237 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1238 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 45, in inner |
1239 | | response = await sync_to_async( |
1240 | | ^^^^^^^^^^^^^^^^^^^^ |
1241 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 448, in __call__ |
1242 | | ret = await asyncio.wait_for(future, timeout=None) |
1243 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1244 | | File "C:\Program Files\Python311\Lib\asyncio\tasks.py", line 442, in wait_for |
1245 | | return await fut |
1246 | | ^^^^^^^^^ |
1247 | | File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run |
1248 | | result = self.fn(*self.args, **self.kwargs) |
1249 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1250 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 488, in thread_handler |
1251 | | return func(*args, **kwargs) |
1252 | | ^^^^^^^^^^^^^^^^^^^^^ |
1253 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 141, in response_for_exception |
1254 | | response = handle_uncaught_exception( |
1255 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1256 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 182, in handle_uncaught_exception |
1257 | | return debug.technical_500_response(request, *exc_info) |
1258 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1259 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 66, in technical_500_response |
1260 | | html = reporter.get_traceback_html() |
1261 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1262 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 396, in get_traceback_html |
1263 | | c = Context(self.get_traceback_data(), use_l10n=False) |
1264 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
1265 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 381, in get_traceback_data |
1266 | | c["raising_view_name"] = get_caller(self.request) |
1267 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
1268 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 99, in get_caller |
1269 | | resolver_match = resolve(request.path) |
1270 | | ^^^^^^^^^^^^^^^^^^^^^ |
1271 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\base.py", line 24, in resolve |
1272 | | return get_resolver(urlconf).resolve(path) |
1273 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1274 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 663, in resolve |
1275 | | for pattern in self.url_patterns: |
1276 | | ^^^^^^^^^^^^^^^^^ |
1277 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
1278 | | res = instance.__dict__[self.name] = self.func(instance) |
1279 | | ^^^^^^^^^^^^^^^^^^^ |
1280 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns |
1281 | | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
1282 | | ^^^^^^^^^^^^^^^^^^^ |
1283 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
1284 | | res = instance.__dict__[self.name] = self.func(instance) |
1285 | | ^^^^^^^^^^^^^^^^^^^ |
1286 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module |
1287 | | return import_module(self.urlconf_name) |
1288 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1289 | | File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module |
1290 | | return _bootstrap._gcd_import(name[level:], package, level) |
1291 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1292 | | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import |
1293 | | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load |
1294 | | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked |
1295 | | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked |
1296 | | File "<frozen importlib._bootstrap_external>", line 940, in exec_module |
1297 | | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed |
1298 | | File "C:\code\myproject\myproject\urls.py", line 8, in <module> |
1299 | | path('test/', TestView.as_view()), |
1300 | | ^^^^^^^^^^^^^^^^^^ |
1301 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 119, in as_view |
1302 | | if cls.view_is_async: |
1303 | | ^^^^^^^^^^^^^^^^^ |
1304 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 71, in __get__ |
1305 | | return self.fget(cls) |
1306 | | ^^^^^^^^^^^^^^ |
1307 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 73, in view_is_async |
1308 | | raise ImproperlyConfigured( |
1309 | | django.core.exceptions.ImproperlyConfigured: TestView HTTP handlers must either be all sync or all async. |
1310 | | |
1311 | | During handling of the above exception, another exception occurred: |
1312 | | |
1313 | | Traceback (most recent call last): |
1314 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 486, in thread_handler |
1315 | | raise exc_info[1] |
1316 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 43, in inner |
1317 | | response = await get_response(request) |
1318 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1319 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\deprecation.py", line 152, in __acall__ |
1320 | | response = response or await self.get_response(request) |
1321 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1322 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 45, in inner |
1323 | | response = await sync_to_async( |
1324 | | ^^^^^^^^^^^^^^^^^^^^ |
1325 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 448, in __call__ |
1326 | | ret = await asyncio.wait_for(future, timeout=None) |
1327 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1328 | | File "C:\Program Files\Python311\Lib\asyncio\tasks.py", line 442, in wait_for |
1329 | | return await fut |
1330 | | ^^^^^^^^^ |
1331 | | File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run |
1332 | | result = self.fn(*self.args, **self.kwargs) |
1333 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1334 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 488, in thread_handler |
1335 | | return func(*args, **kwargs) |
1336 | | ^^^^^^^^^^^^^^^^^^^^^ |
1337 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 141, in response_for_exception |
1338 | | response = handle_uncaught_exception( |
1339 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1340 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 182, in handle_uncaught_exception |
1341 | | return debug.technical_500_response(request, *exc_info) |
1342 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1343 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 66, in technical_500_response |
1344 | | html = reporter.get_traceback_html() |
1345 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1346 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 396, in get_traceback_html |
1347 | | c = Context(self.get_traceback_data(), use_l10n=False) |
1348 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
1349 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 381, in get_traceback_data |
1350 | | c["raising_view_name"] = get_caller(self.request) |
1351 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
1352 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 99, in get_caller |
1353 | | resolver_match = resolve(request.path) |
1354 | | ^^^^^^^^^^^^^^^^^^^^^ |
1355 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\base.py", line 24, in resolve |
1356 | | return get_resolver(urlconf).resolve(path) |
1357 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1358 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 663, in resolve |
1359 | | for pattern in self.url_patterns: |
1360 | | ^^^^^^^^^^^^^^^^^ |
1361 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
1362 | | res = instance.__dict__[self.name] = self.func(instance) |
1363 | | ^^^^^^^^^^^^^^^^^^^ |
1364 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns |
1365 | | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
1366 | | ^^^^^^^^^^^^^^^^^^^ |
1367 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
1368 | | res = instance.__dict__[self.name] = self.func(instance) |
1369 | | ^^^^^^^^^^^^^^^^^^^ |
1370 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module |
1371 | | return import_module(self.urlconf_name) |
1372 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1373 | | File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module |
1374 | | return _bootstrap._gcd_import(name[level:], package, level) |
1375 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1376 | | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import |
1377 | | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load |
1378 | | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked |
1379 | | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked |
1380 | | File "<frozen importlib._bootstrap_external>", line 940, in exec_module |
1381 | | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed |
1382 | | File "C:\code\myproject\myproject\urls.py", line 8, in <module> |
1383 | | path('test/', TestView.as_view()), |
1384 | | ^^^^^^^^^^^^^^^^^^ |
1385 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 119, in as_view |
1386 | | if cls.view_is_async: |
1387 | | ^^^^^^^^^^^^^^^^^ |
1388 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 71, in __get__ |
1389 | | return self.fget(cls) |
1390 | | ^^^^^^^^^^^^^^ |
1391 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 73, in view_is_async |
1392 | | raise ImproperlyConfigured( |
1393 | | django.core.exceptions.ImproperlyConfigured: TestView HTTP handlers must either be all sync or all async. |
1394 | | |
1395 | | During handling of the above exception, another exception occurred: |
1396 | | |
1397 | | Traceback (most recent call last): |
1398 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 486, in thread_handler |
1399 | | raise exc_info[1] |
1400 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 43, in inner |
1401 | | response = await get_response(request) |
1402 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1403 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\deprecation.py", line 152, in __acall__ |
1404 | | response = response or await self.get_response(request) |
1405 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1406 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 45, in inner |
1407 | | response = await sync_to_async( |
1408 | | ^^^^^^^^^^^^^^^^^^^^ |
1409 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 448, in __call__ |
1410 | | ret = await asyncio.wait_for(future, timeout=None) |
1411 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1412 | | File "C:\Program Files\Python311\Lib\asyncio\tasks.py", line 442, in wait_for |
1413 | | return await fut |
1414 | | ^^^^^^^^^ |
1415 | | File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run |
1416 | | result = self.fn(*self.args, **self.kwargs) |
1417 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1418 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 488, in thread_handler |
1419 | | return func(*args, **kwargs) |
1420 | | ^^^^^^^^^^^^^^^^^^^^^ |
1421 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 141, in response_for_exception |
1422 | | response = handle_uncaught_exception( |
1423 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1424 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 182, in handle_uncaught_exception |
1425 | | return debug.technical_500_response(request, *exc_info) |
1426 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1427 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 66, in technical_500_response |
1428 | | html = reporter.get_traceback_html() |
1429 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1430 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 396, in get_traceback_html |
1431 | | c = Context(self.get_traceback_data(), use_l10n=False) |
1432 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
1433 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 381, in get_traceback_data |
1434 | | c["raising_view_name"] = get_caller(self.request) |
1435 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
1436 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 99, in get_caller |
1437 | | resolver_match = resolve(request.path) |
1438 | | ^^^^^^^^^^^^^^^^^^^^^ |
1439 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\base.py", line 24, in resolve |
1440 | | return get_resolver(urlconf).resolve(path) |
1441 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1442 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 663, in resolve |
1443 | | for pattern in self.url_patterns: |
1444 | | ^^^^^^^^^^^^^^^^^ |
1445 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
1446 | | res = instance.__dict__[self.name] = self.func(instance) |
1447 | | ^^^^^^^^^^^^^^^^^^^ |
1448 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns |
1449 | | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
1450 | | ^^^^^^^^^^^^^^^^^^^ |
1451 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
1452 | | res = instance.__dict__[self.name] = self.func(instance) |
1453 | | ^^^^^^^^^^^^^^^^^^^ |
1454 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module |
1455 | | return import_module(self.urlconf_name) |
1456 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1457 | | File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module |
1458 | | return _bootstrap._gcd_import(name[level:], package, level) |
1459 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1460 | | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import |
1461 | | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load |
1462 | | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked |
1463 | | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked |
1464 | | File "<frozen importlib._bootstrap_external>", line 940, in exec_module |
1465 | | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed |
1466 | | File "C:\code\myproject\myproject\urls.py", line 8, in <module> |
1467 | | path('test/', TestView.as_view()), |
1468 | | ^^^^^^^^^^^^^^^^^^ |
1469 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 119, in as_view |
1470 | | if cls.view_is_async: |
1471 | | ^^^^^^^^^^^^^^^^^ |
1472 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 71, in __get__ |
1473 | | return self.fget(cls) |
1474 | | ^^^^^^^^^^^^^^ |
1475 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 73, in view_is_async |
1476 | | raise ImproperlyConfigured( |
1477 | | django.core.exceptions.ImproperlyConfigured: TestView HTTP handlers must either be all sync or all async. |
1478 | | |
1479 | | During handling of the above exception, another exception occurred: |
1480 | | |
1481 | | Traceback (most recent call last): |
1482 | | File "C:\code\myproject\venv\Lib\site-packages\hypercorn\asyncio\task_group.py", line 23, in _handle |
1483 | | await app(scope, receive, send, sync_spawn, call_soon) |
1484 | | File "C:\code\myproject\venv\Lib\site-packages\hypercorn\app_wrappers.py", line 33, in __call__ |
1485 | | await self.app(scope, receive, send) |
1486 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\asgi.py", line 155, in __call__ |
1487 | | await self.handle(scope, receive, send) |
1488 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\asgi.py", line 178, in handle |
1489 | | response = await self.get_response_async(request) |
1490 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1491 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\base.py", line 162, in get_response_async |
1492 | | response = await self._middleware_chain(request) |
1493 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1494 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 45, in inner |
1495 | | response = await sync_to_async( |
1496 | | ^^^^^^^^^^^^^^^^^^^^ |
1497 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 448, in __call__ |
1498 | | ret = await asyncio.wait_for(future, timeout=None) |
1499 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1500 | | File "C:\Program Files\Python311\Lib\asyncio\tasks.py", line 442, in wait_for |
1501 | | return await fut |
1502 | | ^^^^^^^^^ |
1503 | | File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run |
1504 | | result = self.fn(*self.args, **self.kwargs) |
1505 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1506 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 488, in thread_handler |
1507 | | return func(*args, **kwargs) |
1508 | | ^^^^^^^^^^^^^^^^^^^^^ |
1509 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 141, in response_for_exception |
1510 | | response = handle_uncaught_exception( |
1511 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1512 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 182, in handle_uncaught_exception |
1513 | | return debug.technical_500_response(request, *exc_info) |
1514 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1515 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 66, in technical_500_response |
1516 | | html = reporter.get_traceback_html() |
1517 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1518 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 396, in get_traceback_html |
1519 | | c = Context(self.get_traceback_data(), use_l10n=False) |
1520 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
1521 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 381, in get_traceback_data |
1522 | | c["raising_view_name"] = get_caller(self.request) |
1523 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
1524 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 99, in get_caller |
1525 | | resolver_match = resolve(request.path) |
1526 | | ^^^^^^^^^^^^^^^^^^^^^ |
1527 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\base.py", line 24, in resolve |
1528 | | return get_resolver(urlconf).resolve(path) |
1529 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1530 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 663, in resolve |
1531 | | for pattern in self.url_patterns: |
1532 | | ^^^^^^^^^^^^^^^^^ |
1533 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
1534 | | res = instance.__dict__[self.name] = self.func(instance) |
1535 | | ^^^^^^^^^^^^^^^^^^^ |
1536 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns |
1537 | | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
1538 | | ^^^^^^^^^^^^^^^^^^^ |
1539 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
1540 | | res = instance.__dict__[self.name] = self.func(instance) |
1541 | | ^^^^^^^^^^^^^^^^^^^ |
1542 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module |
1543 | | return import_module(self.urlconf_name) |
1544 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1545 | | File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module |
1546 | | return _bootstrap._gcd_import(name[level:], package, level) |
1547 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1548 | | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import |
1549 | | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load |
1550 | | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked |
1551 | | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked |
1552 | | File "<frozen importlib._bootstrap_external>", line 940, in exec_module |
1553 | | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed |
1554 | | File "C:\code\myproject\myproject\urls.py", line 8, in <module> |
1555 | | path('test/', TestView.as_view()), |
1556 | | ^^^^^^^^^^^^^^^^^^ |
1557 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 119, in as_view |
1558 | | if cls.view_is_async: |
1559 | | ^^^^^^^^^^^^^^^^^ |
1560 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 71, in __get__ |
1561 | | return self.fget(cls) |
1562 | | ^^^^^^^^^^^^^^ |
1563 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\generic\base.py", line 73, in view_is_async |
1564 | | raise ImproperlyConfigured( |
1565 | | django.core.exceptions.ImproperlyConfigured: TestView HTTP handlers must either be all sync or all async. |
1566 | | |
1567 | | }}} |
1568 | | |
1569 | | == ############################################################################################# |
| 168 | ... (the same frame over and over again) |
| 169 | }}} |
| 170 | |
| 171 | |
1806 | | During handling of the above exception, another exception occurred: |
1807 | | |
1808 | | Traceback (most recent call last): |
1809 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 486, in thread_handler |
1810 | | raise exc_info[1] |
1811 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 43, in inner |
1812 | | response = await get_response(request) |
1813 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1814 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\deprecation.py", line 152, in __acall__ |
1815 | | response = response or await self.get_response(request) |
1816 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1817 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 45, in inner |
1818 | | response = await sync_to_async( |
1819 | | ^^^^^^^^^^^^^^^^^^^^ |
1820 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 448, in __call__ |
1821 | | ret = await asyncio.wait_for(future, timeout=None) |
1822 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1823 | | File "C:\Program Files\Python311\Lib\asyncio\tasks.py", line 442, in wait_for |
1824 | | return await fut |
1825 | | ^^^^^^^^^ |
1826 | | File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run |
1827 | | result = self.fn(*self.args, **self.kwargs) |
1828 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1829 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 488, in thread_handler |
1830 | | return func(*args, **kwargs) |
1831 | | ^^^^^^^^^^^^^^^^^^^^^ |
1832 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 141, in response_for_exception |
1833 | | response = handle_uncaught_exception( |
1834 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1835 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 182, in handle_uncaught_exception |
1836 | | return debug.technical_500_response(request, *exc_info) |
1837 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1838 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 66, in technical_500_response |
1839 | | html = reporter.get_traceback_html() |
1840 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1841 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 396, in get_traceback_html |
1842 | | c = Context(self.get_traceback_data(), use_l10n=False) |
1843 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
1844 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 381, in get_traceback_data |
1845 | | c["raising_view_name"] = get_caller(self.request) |
1846 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
1847 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 99, in get_caller |
1848 | | resolver_match = resolve(request.path) |
1849 | | ^^^^^^^^^^^^^^^^^^^^^ |
1850 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\base.py", line 24, in resolve |
1851 | | return get_resolver(urlconf).resolve(path) |
1852 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1853 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 663, in resolve |
1854 | | for pattern in self.url_patterns: |
1855 | | ^^^^^^^^^^^^^^^^^ |
1856 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
1857 | | res = instance.__dict__[self.name] = self.func(instance) |
1858 | | ^^^^^^^^^^^^^^^^^^^ |
1859 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns |
1860 | | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
1861 | | ^^^^^^^^^^^^^^^^^^^ |
1862 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
1863 | | res = instance.__dict__[self.name] = self.func(instance) |
1864 | | ^^^^^^^^^^^^^^^^^^^ |
1865 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module |
1866 | | return import_module(self.urlconf_name) |
1867 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1868 | | File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module |
1869 | | return _bootstrap._gcd_import(name[level:], package, level) |
1870 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1871 | | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import |
1872 | | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load |
1873 | | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked |
1874 | | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked |
1875 | | File "<frozen importlib._bootstrap_external>", line 940, in exec_module |
1876 | | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed |
1877 | | File "C:\code\myproject\myproject\urls.py", line 9, in <module> |
1878 | | path("api/", api.urls), |
1879 | | ^^^^^^^^ |
1880 | | File "C:\code\myproject\venv\Lib\site-packages\ninja\main.py", line 379, in urls |
1881 | | self._validate() |
1882 | | File "C:\code\myproject\venv\Lib\site-packages\ninja\main.py", line 494, in _validate |
1883 | | raise ConfigError(msg.strip()) |
1884 | | ninja.errors.ConfigError: Looks like you created multiple NinjaAPIs or TestClients |
1885 | | To let ninja distinguish them you need to set either unique version or urls_namespace |
1886 | | - NinjaAPI(..., version='2.0.0') |
1887 | | - NinjaAPI(..., urls_namespace='otherapi') |
1888 | | Already registered: ['api-1.0.0'] |
1889 | | |
1890 | | During handling of the above exception, another exception occurred: |
1891 | | |
1892 | | Traceback (most recent call last): |
1893 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 486, in thread_handler |
1894 | | raise exc_info[1] |
1895 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 43, in inner |
1896 | | response = await get_response(request) |
1897 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1898 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\deprecation.py", line 152, in __acall__ |
1899 | | response = response or await self.get_response(request) |
1900 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1901 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 45, in inner |
1902 | | response = await sync_to_async( |
1903 | | ^^^^^^^^^^^^^^^^^^^^ |
1904 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 448, in __call__ |
1905 | | ret = await asyncio.wait_for(future, timeout=None) |
1906 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1907 | | File "C:\Program Files\Python311\Lib\asyncio\tasks.py", line 442, in wait_for |
1908 | | return await fut |
1909 | | ^^^^^^^^^ |
1910 | | File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run |
1911 | | result = self.fn(*self.args, **self.kwargs) |
1912 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1913 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 488, in thread_handler |
1914 | | return func(*args, **kwargs) |
1915 | | ^^^^^^^^^^^^^^^^^^^^^ |
1916 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 141, in response_for_exception |
1917 | | response = handle_uncaught_exception( |
1918 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1919 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 182, in handle_uncaught_exception |
1920 | | return debug.technical_500_response(request, *exc_info) |
1921 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1922 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 66, in technical_500_response |
1923 | | html = reporter.get_traceback_html() |
1924 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1925 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 396, in get_traceback_html |
1926 | | c = Context(self.get_traceback_data(), use_l10n=False) |
1927 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
1928 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 381, in get_traceback_data |
1929 | | c["raising_view_name"] = get_caller(self.request) |
1930 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
1931 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 99, in get_caller |
1932 | | resolver_match = resolve(request.path) |
1933 | | ^^^^^^^^^^^^^^^^^^^^^ |
1934 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\base.py", line 24, in resolve |
1935 | | return get_resolver(urlconf).resolve(path) |
1936 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1937 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 663, in resolve |
1938 | | for pattern in self.url_patterns: |
1939 | | ^^^^^^^^^^^^^^^^^ |
1940 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
1941 | | res = instance.__dict__[self.name] = self.func(instance) |
1942 | | ^^^^^^^^^^^^^^^^^^^ |
1943 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns |
1944 | | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
1945 | | ^^^^^^^^^^^^^^^^^^^ |
1946 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
1947 | | res = instance.__dict__[self.name] = self.func(instance) |
1948 | | ^^^^^^^^^^^^^^^^^^^ |
1949 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module |
1950 | | return import_module(self.urlconf_name) |
1951 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1952 | | File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module |
1953 | | return _bootstrap._gcd_import(name[level:], package, level) |
1954 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1955 | | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import |
1956 | | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load |
1957 | | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked |
1958 | | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked |
1959 | | File "<frozen importlib._bootstrap_external>", line 940, in exec_module |
1960 | | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed |
1961 | | File "C:\code\myproject\myproject\urls.py", line 9, in <module> |
1962 | | path("api/", api.urls), |
1963 | | ^^^^^^^^ |
1964 | | File "C:\code\myproject\venv\Lib\site-packages\ninja\main.py", line 379, in urls |
1965 | | self._validate() |
1966 | | File "C:\code\myproject\venv\Lib\site-packages\ninja\main.py", line 494, in _validate |
1967 | | raise ConfigError(msg.strip()) |
1968 | | ninja.errors.ConfigError: Looks like you created multiple NinjaAPIs or TestClients |
1969 | | To let ninja distinguish them you need to set either unique version or urls_namespace |
1970 | | - NinjaAPI(..., version='2.0.0') |
1971 | | - NinjaAPI(..., urls_namespace='otherapi') |
1972 | | Already registered: ['api-1.0.0'] |
1973 | | |
1974 | | During handling of the above exception, another exception occurred: |
1975 | | |
1976 | | Traceback (most recent call last): |
1977 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 486, in thread_handler |
1978 | | raise exc_info[1] |
1979 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 43, in inner |
1980 | | response = await get_response(request) |
1981 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1982 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\deprecation.py", line 152, in __acall__ |
1983 | | response = response or await self.get_response(request) |
1984 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1985 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 45, in inner |
1986 | | response = await sync_to_async( |
1987 | | ^^^^^^^^^^^^^^^^^^^^ |
1988 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 448, in __call__ |
1989 | | ret = await asyncio.wait_for(future, timeout=None) |
1990 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1991 | | File "C:\Program Files\Python311\Lib\asyncio\tasks.py", line 442, in wait_for |
1992 | | return await fut |
1993 | | ^^^^^^^^^ |
1994 | | File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run |
1995 | | result = self.fn(*self.args, **self.kwargs) |
1996 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
1997 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 488, in thread_handler |
1998 | | return func(*args, **kwargs) |
1999 | | ^^^^^^^^^^^^^^^^^^^^^ |
2000 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 141, in response_for_exception |
2001 | | response = handle_uncaught_exception( |
2002 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2003 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 182, in handle_uncaught_exception |
2004 | | return debug.technical_500_response(request, *exc_info) |
2005 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2006 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 66, in technical_500_response |
2007 | | html = reporter.get_traceback_html() |
2008 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2009 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 396, in get_traceback_html |
2010 | | c = Context(self.get_traceback_data(), use_l10n=False) |
2011 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
2012 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 381, in get_traceback_data |
2013 | | c["raising_view_name"] = get_caller(self.request) |
2014 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
2015 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 99, in get_caller |
2016 | | resolver_match = resolve(request.path) |
2017 | | ^^^^^^^^^^^^^^^^^^^^^ |
2018 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\base.py", line 24, in resolve |
2019 | | return get_resolver(urlconf).resolve(path) |
2020 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2021 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 663, in resolve |
2022 | | for pattern in self.url_patterns: |
2023 | | ^^^^^^^^^^^^^^^^^ |
2024 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
2025 | | res = instance.__dict__[self.name] = self.func(instance) |
2026 | | ^^^^^^^^^^^^^^^^^^^ |
2027 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns |
2028 | | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
2029 | | ^^^^^^^^^^^^^^^^^^^ |
2030 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
2031 | | res = instance.__dict__[self.name] = self.func(instance) |
2032 | | ^^^^^^^^^^^^^^^^^^^ |
2033 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module |
2034 | | return import_module(self.urlconf_name) |
2035 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2036 | | File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module |
2037 | | return _bootstrap._gcd_import(name[level:], package, level) |
2038 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2039 | | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import |
2040 | | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load |
2041 | | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked |
2042 | | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked |
2043 | | File "<frozen importlib._bootstrap_external>", line 940, in exec_module |
2044 | | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed |
2045 | | File "C:\code\myproject\myproject\urls.py", line 9, in <module> |
2046 | | path("api/", api.urls), |
2047 | | ^^^^^^^^ |
2048 | | File "C:\code\myproject\venv\Lib\site-packages\ninja\main.py", line 379, in urls |
2049 | | self._validate() |
2050 | | File "C:\code\myproject\venv\Lib\site-packages\ninja\main.py", line 494, in _validate |
2051 | | raise ConfigError(msg.strip()) |
2052 | | ninja.errors.ConfigError: Looks like you created multiple NinjaAPIs or TestClients |
2053 | | To let ninja distinguish them you need to set either unique version or urls_namespace |
2054 | | - NinjaAPI(..., version='2.0.0') |
2055 | | - NinjaAPI(..., urls_namespace='otherapi') |
2056 | | Already registered: ['api-1.0.0'] |
2057 | | |
2058 | | During handling of the above exception, another exception occurred: |
2059 | | |
2060 | | Traceback (most recent call last): |
2061 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 486, in thread_handler |
2062 | | raise exc_info[1] |
2063 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 43, in inner |
2064 | | response = await get_response(request) |
2065 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2066 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\deprecation.py", line 152, in __acall__ |
2067 | | response = response or await self.get_response(request) |
2068 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2069 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 45, in inner |
2070 | | response = await sync_to_async( |
2071 | | ^^^^^^^^^^^^^^^^^^^^ |
2072 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 448, in __call__ |
2073 | | ret = await asyncio.wait_for(future, timeout=None) |
2074 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2075 | | File "C:\Program Files\Python311\Lib\asyncio\tasks.py", line 442, in wait_for |
2076 | | return await fut |
2077 | | ^^^^^^^^^ |
2078 | | File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run |
2079 | | result = self.fn(*self.args, **self.kwargs) |
2080 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2081 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 488, in thread_handler |
2082 | | return func(*args, **kwargs) |
2083 | | ^^^^^^^^^^^^^^^^^^^^^ |
2084 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 141, in response_for_exception |
2085 | | response = handle_uncaught_exception( |
2086 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2087 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 182, in handle_uncaught_exception |
2088 | | return debug.technical_500_response(request, *exc_info) |
2089 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2090 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 66, in technical_500_response |
2091 | | html = reporter.get_traceback_html() |
2092 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2093 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 396, in get_traceback_html |
2094 | | c = Context(self.get_traceback_data(), use_l10n=False) |
2095 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
2096 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 381, in get_traceback_data |
2097 | | c["raising_view_name"] = get_caller(self.request) |
2098 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
2099 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 99, in get_caller |
2100 | | resolver_match = resolve(request.path) |
2101 | | ^^^^^^^^^^^^^^^^^^^^^ |
2102 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\base.py", line 24, in resolve |
2103 | | return get_resolver(urlconf).resolve(path) |
2104 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2105 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 663, in resolve |
2106 | | for pattern in self.url_patterns: |
2107 | | ^^^^^^^^^^^^^^^^^ |
2108 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
2109 | | res = instance.__dict__[self.name] = self.func(instance) |
2110 | | ^^^^^^^^^^^^^^^^^^^ |
2111 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns |
2112 | | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
2113 | | ^^^^^^^^^^^^^^^^^^^ |
2114 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
2115 | | res = instance.__dict__[self.name] = self.func(instance) |
2116 | | ^^^^^^^^^^^^^^^^^^^ |
2117 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module |
2118 | | return import_module(self.urlconf_name) |
2119 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2120 | | File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module |
2121 | | return _bootstrap._gcd_import(name[level:], package, level) |
2122 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2123 | | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import |
2124 | | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load |
2125 | | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked |
2126 | | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked |
2127 | | File "<frozen importlib._bootstrap_external>", line 940, in exec_module |
2128 | | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed |
2129 | | File "C:\code\myproject\myproject\urls.py", line 9, in <module> |
2130 | | path("api/", api.urls), |
2131 | | ^^^^^^^^ |
2132 | | File "C:\code\myproject\venv\Lib\site-packages\ninja\main.py", line 379, in urls |
2133 | | self._validate() |
2134 | | File "C:\code\myproject\venv\Lib\site-packages\ninja\main.py", line 494, in _validate |
2135 | | raise ConfigError(msg.strip()) |
2136 | | ninja.errors.ConfigError: Looks like you created multiple NinjaAPIs or TestClients |
2137 | | To let ninja distinguish them you need to set either unique version or urls_namespace |
2138 | | - NinjaAPI(..., version='2.0.0') |
2139 | | - NinjaAPI(..., urls_namespace='otherapi') |
2140 | | Already registered: ['api-1.0.0'] |
2141 | | |
2142 | | During handling of the above exception, another exception occurred: |
2143 | | |
2144 | | Traceback (most recent call last): |
2145 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 486, in thread_handler |
2146 | | raise exc_info[1] |
2147 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 43, in inner |
2148 | | response = await get_response(request) |
2149 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2150 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\deprecation.py", line 152, in __acall__ |
2151 | | response = response or await self.get_response(request) |
2152 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2153 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 45, in inner |
2154 | | response = await sync_to_async( |
2155 | | ^^^^^^^^^^^^^^^^^^^^ |
2156 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 448, in __call__ |
2157 | | ret = await asyncio.wait_for(future, timeout=None) |
2158 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2159 | | File "C:\Program Files\Python311\Lib\asyncio\tasks.py", line 442, in wait_for |
2160 | | return await fut |
2161 | | ^^^^^^^^^ |
2162 | | File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run |
2163 | | result = self.fn(*self.args, **self.kwargs) |
2164 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2165 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 488, in thread_handler |
2166 | | return func(*args, **kwargs) |
2167 | | ^^^^^^^^^^^^^^^^^^^^^ |
2168 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 141, in response_for_exception |
2169 | | response = handle_uncaught_exception( |
2170 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2171 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 182, in handle_uncaught_exception |
2172 | | return debug.technical_500_response(request, *exc_info) |
2173 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2174 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 66, in technical_500_response |
2175 | | html = reporter.get_traceback_html() |
2176 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2177 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 396, in get_traceback_html |
2178 | | c = Context(self.get_traceback_data(), use_l10n=False) |
2179 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
2180 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 381, in get_traceback_data |
2181 | | c["raising_view_name"] = get_caller(self.request) |
2182 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
2183 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 99, in get_caller |
2184 | | resolver_match = resolve(request.path) |
2185 | | ^^^^^^^^^^^^^^^^^^^^^ |
2186 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\base.py", line 24, in resolve |
2187 | | return get_resolver(urlconf).resolve(path) |
2188 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2189 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 663, in resolve |
2190 | | for pattern in self.url_patterns: |
2191 | | ^^^^^^^^^^^^^^^^^ |
2192 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
2193 | | res = instance.__dict__[self.name] = self.func(instance) |
2194 | | ^^^^^^^^^^^^^^^^^^^ |
2195 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns |
2196 | | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
2197 | | ^^^^^^^^^^^^^^^^^^^ |
2198 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
2199 | | res = instance.__dict__[self.name] = self.func(instance) |
2200 | | ^^^^^^^^^^^^^^^^^^^ |
2201 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module |
2202 | | return import_module(self.urlconf_name) |
2203 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2204 | | File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module |
2205 | | return _bootstrap._gcd_import(name[level:], package, level) |
2206 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2207 | | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import |
2208 | | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load |
2209 | | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked |
2210 | | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked |
2211 | | File "<frozen importlib._bootstrap_external>", line 940, in exec_module |
2212 | | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed |
2213 | | File "C:\code\myproject\myproject\urls.py", line 9, in <module> |
2214 | | path("api/", api.urls), |
2215 | | ^^^^^^^^ |
2216 | | File "C:\code\myproject\venv\Lib\site-packages\ninja\main.py", line 379, in urls |
2217 | | self._validate() |
2218 | | File "C:\code\myproject\venv\Lib\site-packages\ninja\main.py", line 494, in _validate |
2219 | | raise ConfigError(msg.strip()) |
2220 | | ninja.errors.ConfigError: Looks like you created multiple NinjaAPIs or TestClients |
2221 | | To let ninja distinguish them you need to set either unique version or urls_namespace |
2222 | | - NinjaAPI(..., version='2.0.0') |
2223 | | - NinjaAPI(..., urls_namespace='otherapi') |
2224 | | Already registered: ['api-1.0.0'] |
2225 | | |
2226 | | During handling of the above exception, another exception occurred: |
2227 | | |
2228 | | Traceback (most recent call last): |
2229 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 486, in thread_handler |
2230 | | raise exc_info[1] |
2231 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 43, in inner |
2232 | | response = await get_response(request) |
2233 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2234 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\deprecation.py", line 152, in __acall__ |
2235 | | response = response or await self.get_response(request) |
2236 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2237 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 45, in inner |
2238 | | response = await sync_to_async( |
2239 | | ^^^^^^^^^^^^^^^^^^^^ |
2240 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 448, in __call__ |
2241 | | ret = await asyncio.wait_for(future, timeout=None) |
2242 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2243 | | File "C:\Program Files\Python311\Lib\asyncio\tasks.py", line 442, in wait_for |
2244 | | return await fut |
2245 | | ^^^^^^^^^ |
2246 | | File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run |
2247 | | result = self.fn(*self.args, **self.kwargs) |
2248 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2249 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 488, in thread_handler |
2250 | | return func(*args, **kwargs) |
2251 | | ^^^^^^^^^^^^^^^^^^^^^ |
2252 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 141, in response_for_exception |
2253 | | response = handle_uncaught_exception( |
2254 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2255 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 182, in handle_uncaught_exception |
2256 | | return debug.technical_500_response(request, *exc_info) |
2257 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2258 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 66, in technical_500_response |
2259 | | html = reporter.get_traceback_html() |
2260 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2261 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 396, in get_traceback_html |
2262 | | c = Context(self.get_traceback_data(), use_l10n=False) |
2263 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
2264 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 381, in get_traceback_data |
2265 | | c["raising_view_name"] = get_caller(self.request) |
2266 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
2267 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 99, in get_caller |
2268 | | resolver_match = resolve(request.path) |
2269 | | ^^^^^^^^^^^^^^^^^^^^^ |
2270 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\base.py", line 24, in resolve |
2271 | | return get_resolver(urlconf).resolve(path) |
2272 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2273 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 663, in resolve |
2274 | | for pattern in self.url_patterns: |
2275 | | ^^^^^^^^^^^^^^^^^ |
2276 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
2277 | | res = instance.__dict__[self.name] = self.func(instance) |
2278 | | ^^^^^^^^^^^^^^^^^^^ |
2279 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns |
2280 | | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
2281 | | ^^^^^^^^^^^^^^^^^^^ |
2282 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
2283 | | res = instance.__dict__[self.name] = self.func(instance) |
2284 | | ^^^^^^^^^^^^^^^^^^^ |
2285 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module |
2286 | | return import_module(self.urlconf_name) |
2287 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2288 | | File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module |
2289 | | return _bootstrap._gcd_import(name[level:], package, level) |
2290 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2291 | | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import |
2292 | | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load |
2293 | | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked |
2294 | | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked |
2295 | | File "<frozen importlib._bootstrap_external>", line 940, in exec_module |
2296 | | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed |
2297 | | File "C:\code\myproject\myproject\urls.py", line 9, in <module> |
2298 | | path("api/", api.urls), |
2299 | | ^^^^^^^^ |
2300 | | File "C:\code\myproject\venv\Lib\site-packages\ninja\main.py", line 379, in urls |
2301 | | self._validate() |
2302 | | File "C:\code\myproject\venv\Lib\site-packages\ninja\main.py", line 494, in _validate |
2303 | | raise ConfigError(msg.strip()) |
2304 | | ninja.errors.ConfigError: Looks like you created multiple NinjaAPIs or TestClients |
2305 | | To let ninja distinguish them you need to set either unique version or urls_namespace |
2306 | | - NinjaAPI(..., version='2.0.0') |
2307 | | - NinjaAPI(..., urls_namespace='otherapi') |
2308 | | Already registered: ['api-1.0.0'] |
2309 | | |
2310 | | During handling of the above exception, another exception occurred: |
2311 | | |
2312 | | Traceback (most recent call last): |
2313 | | File "C:\code\myproject\venv\Lib\site-packages\hypercorn\asyncio\task_group.py", line 23, in _handle |
2314 | | await app(scope, receive, send, sync_spawn, call_soon) |
2315 | | File "C:\code\myproject\venv\Lib\site-packages\hypercorn\app_wrappers.py", line 33, in __call__ |
2316 | | await self.app(scope, receive, send) |
2317 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\asgi.py", line 155, in __call__ |
2318 | | await self.handle(scope, receive, send) |
2319 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\asgi.py", line 178, in handle |
2320 | | response = await self.get_response_async(request) |
2321 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2322 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\base.py", line 162, in get_response_async |
2323 | | response = await self._middleware_chain(request) |
2324 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2325 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 45, in inner |
2326 | | response = await sync_to_async( |
2327 | | ^^^^^^^^^^^^^^^^^^^^ |
2328 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 448, in __call__ |
2329 | | ret = await asyncio.wait_for(future, timeout=None) |
2330 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2331 | | File "C:\Program Files\Python311\Lib\asyncio\tasks.py", line 442, in wait_for |
2332 | | return await fut |
2333 | | ^^^^^^^^^ |
2334 | | File "C:\Program Files\Python311\Lib\concurrent\futures\thread.py", line 58, in run |
2335 | | result = self.fn(*self.args, **self.kwargs) |
2336 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2337 | | File "C:\code\myproject\venv\Lib\site-packages\asgiref\sync.py", line 488, in thread_handler |
2338 | | return func(*args, **kwargs) |
2339 | | ^^^^^^^^^^^^^^^^^^^^^ |
2340 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 141, in response_for_exception |
2341 | | response = handle_uncaught_exception( |
2342 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2343 | | File "C:\code\myproject\venv\Lib\site-packages\django\core\handlers\exception.py", line 182, in handle_uncaught_exception |
2344 | | return debug.technical_500_response(request, *exc_info) |
2345 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2346 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 66, in technical_500_response |
2347 | | html = reporter.get_traceback_html() |
2348 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2349 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 396, in get_traceback_html |
2350 | | c = Context(self.get_traceback_data(), use_l10n=False) |
2351 | | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
2352 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 381, in get_traceback_data |
2353 | | c["raising_view_name"] = get_caller(self.request) |
2354 | | ^^^^^^^^^^^^^^^^^^^^^^^^ |
2355 | | File "C:\code\myproject\venv\Lib\site-packages\django\views\debug.py", line 99, in get_caller |
2356 | | resolver_match = resolve(request.path) |
2357 | | ^^^^^^^^^^^^^^^^^^^^^ |
2358 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\base.py", line 24, in resolve |
2359 | | return get_resolver(urlconf).resolve(path) |
2360 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2361 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 663, in resolve |
2362 | | for pattern in self.url_patterns: |
2363 | | ^^^^^^^^^^^^^^^^^ |
2364 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
2365 | | res = instance.__dict__[self.name] = self.func(instance) |
2366 | | ^^^^^^^^^^^^^^^^^^^ |
2367 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 715, in url_patterns |
2368 | | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
2369 | | ^^^^^^^^^^^^^^^^^^^ |
2370 | | File "C:\code\myproject\venv\Lib\site-packages\django\utils\functional.py", line 57, in __get__ |
2371 | | res = instance.__dict__[self.name] = self.func(instance) |
2372 | | ^^^^^^^^^^^^^^^^^^^ |
2373 | | File "C:\code\myproject\venv\Lib\site-packages\django\urls\resolvers.py", line 708, in urlconf_module |
2374 | | return import_module(self.urlconf_name) |
2375 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2376 | | File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, in import_module |
2377 | | return _bootstrap._gcd_import(name[level:], package, level) |
2378 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2379 | | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import |
2380 | | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load |
2381 | | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked |
2382 | | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked |
2383 | | File "<frozen importlib._bootstrap_external>", line 940, in exec_module |
2384 | | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed |
2385 | | File "C:\code\myproject\myproject\urls.py", line 9, in <module> |
2386 | | path("api/", api.urls), |
2387 | | ^^^^^^^^ |
2388 | | File "C:\code\myproject\venv\Lib\site-packages\ninja\main.py", line 379, in urls |
2389 | | self._validate() |
2390 | | File "C:\code\myproject\venv\Lib\site-packages\ninja\main.py", line 494, in _validate |
2391 | | raise ConfigError(msg.strip()) |
2392 | | ninja.errors.ConfigError: Looks like you created multiple NinjaAPIs or TestClients |
2393 | | To let ninja distinguish them you need to set either unique version or urls_namespace |
2394 | | - NinjaAPI(..., version='2.0.0') |
2395 | | - NinjaAPI(..., urls_namespace='otherapi') |
2396 | | Already registered: ['api-1.0.0'] |
2397 | | }}} |
2398 | | |
2399 | | |
| 407 | During handling of the above exception, another exception occurred: |
| 408 | |
| 409 | ... (the same frame over and over again) |
| 410 | }}} |