Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] [Chat DB] 配置TuGraph后,ChatDB 无应答显示'list_iterator' object is not subscriptable #2469

Open
5 of 15 tasks
AlexanderGPY opened this issue Mar 14, 2025 · 0 comments
Labels
bug Something isn't working Waiting for reply

Comments

@AlexanderGPY
Copy link

Search before asking

  • I had searched in the issues and found no similar issues.

Operating system information

Linux

Python version information

=3.11

DB-GPT version

main

Related scenes

  • Chat Data
  • Chat Excel
  • Chat DB
  • Chat Knowledge
  • Model Management
  • Dashboard
  • Plugins

Installation Information

Device information

CPU

Models information

QWen32B

What happened

集成TuGraph后,引入模版图谱TheThreeBody_022F,进行ChatDB时报错:

Image

再进入到配置TuGraph界面,点击刷新,依然报错:

Image

What you expected to happen

nothing

How to reproduce

1、添加TuGraph
2、刷新TuGraph
3、ChatDB选择该数据库,然后任意聊天

Additional context

日志信息:
2025-03-14 17:26:16 rocky9.0-2 dbgpt_serve.core.schemas[19397] ERROR common_exception_handler catch Exception: success=False err_code='E0003' err_msg="'list_iterator' object is not subscriptable" data=None
INFO: 10.36.196.238:62098 - "POST /api/v2/serve/datasources/1/refresh HTTP/1.1" 400 Bad Request
ERROR: Exception in ASGI application

  • Exception Group Traceback (most recent call last):
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 77, in collapse_excgroups
    | yield
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 186, in call
    | async with anyio.create_task_group() as task_group:
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 767, in aexit
    | raise BaseExceptionGroup(
    | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
    +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 409, in run_asgi
    | result = await app( # type: ignore[func-returns-value]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in call
    | return await self.app(scope, receive, send)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in call
    | await self.simple_response(scope, receive, send, request_headers=headers)
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 144, in simple_response
    | await self.app(scope, receive, send)
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in call
    | await super().call(scope, receive, send)
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/applications.py", line 113, in call
    | await self.middleware_stack(scope, receive, send)
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in call
    | raise exc
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in call
    | await self.app(scope, receive, _send)
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 185, in call
    | with collapse_excgroups():
    | File "/root/miniconda3/envs/dbgpt/lib/python3.11/contextlib.py", line 158, in exit
    | self.gen.throw(typ, value, traceback)
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 83, in collapse_excgroups
    | raise exc
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 187, in call
    | response = await self.dispatch_func(request, call_next)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/root/guopengye/DB-GPT/packages/dbgpt-core/src/dbgpt/util/tracer/tracer_middleware.py", line 49, in dispatch
    | response = await call_next(request)
    | ^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 163, in call_next
    | raise app_exc
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 149, in coro
    | await self.app(scope, receive_or_disconnect, send_no_error)
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call
    | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 62, in wrapped_app
    | raise exc
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 51, in wrapped_app
    | await app(scope, receive, sender)
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/routing.py", line 715, in call
    | await self.middleware_stack(scope, receive, send)
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
    | await route.handle(scope, receive, send)
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
    | await self.app(scope, receive, send)
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
    | await wrap_app_handling_exceptions(app, request)(scope, receive, send)
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 62, in wrapped_app
    | raise exc
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 51, in wrapped_app
    | await app(scope, receive, sender)
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
    | response = await f(request)
    | ^^^^^^^^^^^^^^^^
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
    | raw_response = await run_endpoint_function(
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 212, in run_endpoint_function
    | return await dependant.call(**values)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/root/guopengye/DB-GPT/packages/dbgpt-serve/src/dbgpt_serve/datasource/api/endpoints.py", line 259, in refresh_datasource
    | res = await blocking_func_to_async(
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/root/guopengye/DB-GPT/packages/dbgpt-serve/src/dbgpt_serve/core/init.py", line 32, in blocking_func_to_async
    | return await _blocking_func_to_async(executor, func, *args, **kwargs)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/root/guopengye/DB-GPT/packages/dbgpt-core/src/dbgpt/util/executor_utils.py", line 70, in blocking_func_to_async
    | return await loop.run_in_executor(executor, run_with_context)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/root/miniconda3/envs/dbgpt/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    | result = self.fn(*self.args, **self.kwargs)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/root/guopengye/DB-GPT/packages/dbgpt-core/src/dbgpt/util/executor_utils.py", line 67, in run_with_context
    | return ctx.run(partial(func, *args, **kwargs))
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/root/guopengye/DB-GPT/packages/dbgpt-serve/src/dbgpt_serve/datasource/service/service.py", line 310, in refresh
    | self._db_summary_client.db_summary_embedding(
    | File "/root/guopengye/DB-GPT/packages/dbgpt-serve/src/dbgpt_serve/datasource/service/db_summary_client.py", line 50, in db_summary_embedding
    | db_summary_client = self.create_summary_client(dbname, db_type)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/root/guopengye/DB-GPT/packages/dbgpt-serve/src/dbgpt_serve/datasource/service/db_summary_client.py", line 154, in create_summary_client
    | return GdbmsSummary(dbname, db_type)
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | File "/root/guopengye/DB-GPT/packages/dbgpt-ext/src/dbgpt_ext/rag/summary/gdbms_db_summary.py", line 48, in init
    | for table_name in tables["vertex_tables"]
    | ~~~~~~^^^^^^^^^^^^^^^^^
    | TypeError: 'list_iterator' object is not subscriptable
    +------------------------------------

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/httptools_impl.py", line 409, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in call
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in call
await self.simple_response(scope, receive, send, request_headers=headers)
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 144, in simple_response
await self.app(scope, receive, send)
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in call
await super().call(scope, receive, send)
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/applications.py", line 113, in call
await self.middleware_stack(scope, receive, send)
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in call
raise exc
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in call
await self.app(scope, receive, _send)
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 185, in call
with collapse_excgroups():
File "/root/miniconda3/envs/dbgpt/lib/python3.11/contextlib.py", line 158, in exit
self.gen.throw(typ, value, traceback)
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/_utils.py", line 83, in collapse_excgroups
raise exc
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 187, in call
response = await self.dispatch_func(request, call_next)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/guopengye/DB-GPT/packages/dbgpt-core/src/dbgpt/util/tracer/tracer_middleware.py", line 49, in dispatch
response = await call_next(request)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 163, in call_next
raise app_exc
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 149, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 62, in wrapped_app
raise exc
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 51, in wrapped_app
await app(scope, receive, sender)
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/routing.py", line 715, in call
await self.middleware_stack(scope, receive, send)
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
await route.handle(scope, receive, send)
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
await self.app(scope, receive, send)
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 62, in wrapped_app
raise exc
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/_exception_handler.py", line 51, in wrapped_app
await app(scope, receive, sender)
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
response = await f(request)
^^^^^^^^^^^^^^^^
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/guopengye/DB-GPT/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 212, in run_endpoint_function
return await dependant.call(**values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/guopengye/DB-GPT/packages/dbgpt-serve/src/dbgpt_serve/datasource/api/endpoints.py", line 259, in refresh_datasource
res = await blocking_func_to_async(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/guopengye/DB-GPT/packages/dbgpt-serve/src/dbgpt_serve/core/init.py", line 32, in blocking_func_to_async
return await _blocking_func_to_async(executor, func, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/guopengye/DB-GPT/packages/dbgpt-core/src/dbgpt/util/executor_utils.py", line 70, in blocking_func_to_async
return await loop.run_in_executor(executor, run_with_context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/dbgpt/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/guopengye/DB-GPT/packages/dbgpt-core/src/dbgpt/util/executor_utils.py", line 67, in run_with_context
return ctx.run(partial(func, *args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/guopengye/DB-GPT/packages/dbgpt-serve/src/dbgpt_serve/datasource/service/service.py", line 310, in refresh
self._db_summary_client.db_summary_embedding(
File "/root/guopengye/DB-GPT/packages/dbgpt-serve/src/dbgpt_serve/datasource/service/db_summary_client.py", line 50, in db_summary_embedding
db_summary_client = self.create_summary_client(dbname, db_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/guopengye/DB-GPT/packages/dbgpt-serve/src/dbgpt_serve/datasource/service/db_summary_client.py", line 154, in create_summary_client
return GdbmsSummary(dbname, db_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/guopengye/DB-GPT/packages/dbgpt-ext/src/dbgpt_ext/rag/summary/gdbms_db_summary.py", line 48, in init
for table_name in tables["vertex_tables"]
~~~~~~^^^^^^^^^^^^^^^^^
TypeError: 'list_iterator' object is not subscriptable

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@AlexanderGPY AlexanderGPY added bug Something isn't working Waiting for reply labels Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Waiting for reply
Projects
None yet
Development

No branches or pull requests

1 participant