Gradio 실행 시 Jinja2 / ASGI TypeError: unhashable type: 'dict' 에러 문의
미해결
RAG 마스터: 기초부터 고급기법까지 (feat. LangChain)
안녕하세요, 강의 내용대로 Gradio를 이용하여 인터페이스를 실행하려는데 아래와 같이 ASGI application 에러가 발생하며 서버가 정상 동작하지 않습니다. 어떡해야할까요? ERROR: Exception in ASGI application Traceback (most recent call last): File "/opt/anaconda3/envs/langchain_env/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_ impl.py ", line 422, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/anaconda3/envs/langchain_env/lib/python3.11/site-packages/uvicorn/middleware/proxy_ headers.py ", line 63, in call return await self.app (scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/anaconda3/envs/langchain_env/lib/python3.11/site-packages/fastapi/ applications.py ", line 1163, in call await super().__call__(scope, receive, send) File "/opt/anaconda3/envs/langchain_env/lib/python3.11/site-packages/starlette/ applications.py ", line 90, in call await self.middleware_stack(scope, receive, send) File "/opt/anaconda3/envs/langchain_env/lib/python3.11/site-packages/starlette/middleware/ errors.py ", line 186, in call raise exc File "/opt/anaconda3/envs/langchain_env/lib/python3.11/site-packages/starlette/middleware/ errors.py ", line 164, in call await self.app (scope, receive, send) File "/opt/anaconda3/envs/langchain env/lib/python3.11/site-packages/gradio/route_ utils.py ", line 761, in call await self.app (scope, receive, send) File "/opt/anaconda3/envs/langchain_env/lib/python3.11/site-packages/starlette/middleware/ exceptions.py ", line 63, in call await wrap_app_handling_exceptions( self.app , conn)(scope, receive, send) File "/opt/anaconda3/envs/langchain_env/lib/python3.11/site-packages/starlette/_exception_ handler.py ", line 53, in wrapped_app raise exc File "/opt/anaconda3/envs/langchain_env/lib/python3.11/site-packages/starlette/_exception_ handler.py ", line 42, in wrapped_app await app(scope, receive, sender) File "/opt/anaconda3/envs/langchain_env/lib/python3.11/site-packages/fastapi/middleware/ asyncexitstack.py ", line 18, in call ... File "/opt/anaconda3/envs/langchain_env/lib/python3.11/site-packages/jinja2/ utils.py ", line 515, in getitem rv = self._mapping[key] ~~~~~~~~~~~~~^^^^^ TypeError: unhashable type: 'dict' Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings... Running on local URL: http://127.0.0.1:**** ERROR: Exception in ASGI application Traceback (most recent call last): File "/opt/anaconda3/envs/langchain_env/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_ impl.py ", line 422, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/anaconda3/envs/langchain_env/lib/python3.11/site-packages/uvicorn/middleware/proxy_ headers.py ", line 63, in call return await self.app (scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/anaconda3/envs/langchain_env/lib/python3.11/site-packages/fastapi/ applications.py ", line 1163, in call await super().__call__(scope, receive, send) File "/opt/anaconda3/envs/langchain_env/lib/python3.11/site-packages/starlette/ applications.py ", line 90, in call await self.middleware_stack(scope, receive, send) File "/opt/anaconda3/envs/langchain_env/lib/python3.11/site-packages/starlette/middleware/ errors.py ", line 186, in call raise exc File "/opt/anaconda3/envs/langchain_env/lib/python3.11/site-packages/starlette/middleware/ errors.py ", line 164, in call await self.app (scope, receive, send) File "/opt/anaconda3/envs/langchain env/lib/python3.11/site-packages/gradio/route_ utils.py ", line 761, in call await self.app (scope, receive, send) File "/opt/anaconda3/envs/langchain_env/lib/python3.11/site-packages/starlette/middleware/ exceptions.py ", line 63, in call await wrap_app_handling_exceptions( self.app , conn)(scope, receive, send) File "/opt/anaconda3/envs/langchain_env/lib/python3.11/site-packages/starlette/_exception_ handler.py ", line 53, in wrapped_app raise exc File "/opt/anaconda3/envs/langchain_env/lib/python3.11/site-packages/starlette/_exception_ handler.py ", line 42, in wrapped_app await app(scope, receive, sender) File "/opt/anaconda3/envs/langchain_env/lib/python3.11/site-packages/fastapi/middleware/ asyncexitstack.py ", line 18, in call ... File "/opt/anaconda3/envs/langchain_env/lib/python3.11/site-packages/jinja2/ utils.py ", line 515, in getitem rv = self._mapping[key] ~~~~~~~~~~~~~^^^^^ TypeError: unhashable type: 'dict' Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...
- python
- 챗봇
- llm
- langchain
- rag





