2025-04-08 16:21:51.983 | ERROR | 18ac3890a6ca4f82b4f3e2819816eec1 | Exception in ASGI application Traceback (most recent call last): File "C:\University-HCMUTE\InternFuta\ApiDialogflowChatbot\run.py", line 9, in server.run() │ └ File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\uvicorn\server.py", line 66, in run return asyncio.run(self.serve(sockets=sockets)) │ │ │ │ └ None │ │ │ └ │ │ └ │ └ File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) │ │ └ │ └ └ <_WindowsSelectorEventLoop running=True closed=False debug=False> File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\asyncio\base_events.py", line 633, in run_until_complete self.run_forever() │ └ └ <_WindowsSelectorEventLoop running=True closed=False debug=False> File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\asyncio\base_events.py", line 600, in run_forever self._run_once() │ └ └ <_WindowsSelectorEventLoop running=True closed=False debug=False> File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\asyncio\base_events.py", line 1896, in _run_once handle._run() │ └ ()> File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\asyncio\events.py", line 80, in _run self._context.run(self._callback, *self._args) │ │ │ │ │ └ │ │ │ │ └ ()> │ │ │ └ │ │ └ ()> │ └ ()> > File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 403, in run_asgi result = await app( # type: ignore[func-returns-value] └ File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 60, in __call__ return await self.app(scope, receive, send) │ │ │ │ └ > │ │ │ └ File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\fastapi\applications.py", line 1054, in __call__ await super().__call__(scope, receive, send) │ │ └ > │ └ > │ │ │ └ File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\starlette\middleware\errors.py", line 187, in __call__ raise exc File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\starlette\middleware\errors.py", line 165, in __call__ await self.app(scope, receive, _send) │ │ │ │ └ ._send at 0x00000245601671C0> │ │ │ └ File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\starlette\middleware\cors.py", line 85, in __call__ await self.app(scope, receive, send) │ │ │ │ └ ._send at 0x00000245601671C0> │ │ │ └ , header_name='... └ File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\asgi_correlation_id\middleware.py", line 90, in __call__ await self.app(scope, receive, handle_outgoing_request) │ │ │ │ └ .handle_outgoing_request at 0x0000024560167130> │ │ │ └ └ CorrelationIdMiddleware(app=, header_name='... File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\starlette\middleware\exceptions.py", line 62, in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) │ │ │ │ │ │ └ .handle_outgoing_request at 0x0000024560167130> │ │ │ │ │ └ │ │ └ │ └ File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app raise exc File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) │ │ │ └ .wrapped_app..sender at 0x0000024560167250> │ │ └ File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\starlette\routing.py", line 714, in __call__ await self.middleware_stack(scope, receive, send) │ │ │ │ └ .wrapped_app..sender at 0x0000024560167250> │ │ │ └ > └ File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\starlette\routing.py", line 734, in app await route.handle(scope, receive, send) │ │ │ │ └ .wrapped_app..sender at 0x0000024560167250> │ │ │ └ └ APIRoute(path='/api/v1/chatbot', name='index', methods=['GET']) File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\starlette\routing.py", line 288, in handle await self.app(scope, receive, send) │ │ │ │ └ .wrapped_app..sender at 0x0000024560167250> │ │ │ └ .app at 0x00000245601669E0> └ APIRoute(path='/api/v1/chatbot', name='index', methods=['GET']) File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\starlette\routing.py", line 76, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) │ │ │ │ │ └ .wrapped_app..sender at 0x0000024560167250> │ │ │ │ └ │ └ .app..app at 0x00000245601672E0> └ File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app raise exc File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) │ │ │ └ .wrapped_app..sender at 0x0000024560167370> │ │ └ .app..app at 0x00000245601672E0> File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\starlette\routing.py", line 73, in app response = await f(request) │ └ .app at 0x0000024560166950> File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\fastapi\routing.py", line 301, in app raw_response = await run_endpoint_function( └ File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\fastapi\routing.py", line 212, in run_endpoint_function return await dependant.call(**values) │ │ └ {'request': } │ └ └ Dependant(path_params=[], query_params=[], header_params=[], cookie_params=[], body_params=[], dependencies=[], security_requ... File "C:\University-HCMUTE\InternFuta\ApiDialogflowChatbot\app\dialogflow\api\v1\dialogflow.py", line 394, in index return templates.TemplateResponse("index.html", {"request": request, "title": "Dawi Chatbot"}) │ │ └ │ └ File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\starlette\templating.py", line 208, in TemplateResponse template = self.get_template(name) │ │ └ 'index.html' │ └ File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\starlette\templating.py", line 131, in get_template return self.env.get_template(name) │ │ │ └ 'index.html' │ │ └ │ └ File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\jinja2\environment.py", line 1016, in get_template return self._load_template(name, globals) │ │ │ └ None │ │ └ 'index.html' │ └ File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\jinja2\environment.py", line 975, in _load_template template = self.loader.load(self, name, self.make_globals(globals)) │ │ │ │ │ │ │ └ None │ │ │ │ │ │ └ │ │ │ │ │ └ │ │ │ │ └ 'index.html' │ │ │ └ │ │ └ │ └ File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\jinja2\loaders.py", line 126, in load source, filename, uptodate = self.get_source(environment, name) │ │ │ └ 'index.html' │ │ └ │ └ File "C:\Users\tuf\miniconda3\envs\chatbot-deploy\lib\site-packages\jinja2\loaders.py", line 209, in get_source raise TemplateNotFound( └ jinja2.exceptions.TemplateNotFound: 'index.html' not found in search path: 'app/templates'