DB-GPT [Bug] [SQL] 未知列 无效字段

9bfwbjaz  于 2个月前  发布在  其他
关注(0)|答案(2)|浏览(21)

在提问前搜索

  • 我在 issues 中进行了搜索,但没有找到类似的问题。

操作系统信息

MacOS(M1, M2...)

Python版本信息

3.10

DB-GPT版本

最新版本

相关场景

  • 聊天数据
  • 聊天Excel
  • 聊天数据库
  • 聊天知识库
  • 模型管理
  • Jmeter 盘
  • 插件

安装信息

设备信息

MacOS 14

模型信息

LLM: openai
嵌入: bge-large-zh

发生了什么?

未知列 'dbgpt_serve_flow.define_type'
Traceback (most recent call last): File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 2247, in <module> main() File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 2229, in main globals = debugger.run(setup['file'], None, None, is_module) File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 1539, in run return self._exec(is_module, entry_point_fn, module_name, file, globals, locals) File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 1546, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "/Users/kenneth/My/Codes/8-PythonTemp/DB-GPT/dbgpt/app/dbgpt_server.py", line 264, in <module> run_webserver() File "/Users/kenneth/My/Codes/8-PythonTemp/DB-GPT/dbgpt/app/dbgpt_server.py", line 259, in run_webserver param = initialize_app(param) File "/Users/kenneth/My/Codes/8-PythonTemp/DB-GPT/dbgpt/app/dbgpt_server.py", line 216, in initialize_app system_app.before_start() File "/Users/kenneth/My/Codes/8-PythonTemp/DB-GPT/dbgpt/component.py", line 264, in before_start v.before_start() File "/Users/kenneth/My/Codes/8-PythonTemp/DB-GPT/dbgpt/serve/flow/service/service.py", line 82, in before_start self._pre_load_dag_from_db() File "/Users/kenneth/My/Codes/8-PythonTemp/DB-GPT/dbgpt/serve/flow/service/service.py", line 186, in _pre_load_dag_from_db entities = self.dao.get_list({}) File "/Users/kenneth/My/Codes/8-PythonTemp/DB-GPT/dbgpt/storage/metadata/_base_dao.py", line 218, in get_list result_list = self._get_entity_list(session, query_request) File "/Users/kenneth/My/Codes/8-PythonTemp/DB-GPT/dbgpt/storage/metadata/_base_dao.py", line 231, in _get_entity_list result_list = query.all() File "/Users/kenneth/anaconda3/envs/db-gpt/lib/python3.10/site-packages/sqlalchemy/orm/query.py", line 2673, in all return self._iter().all() # type: ignore File "/Users/kenneth/anaconda3/envs/db-gpt/lib/python3.10/site-packages/sqlalchemy/orm/query.py", line 2827, in _iter result: Union[ScalarResult[_T], Result[_T]] = self.session.execute( File "/Users/kenneth/anaconda3/envs/db-gpt/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2306, in execute return self._execute_internal( File "/Users/kenneth/anaconda3/envs/db-gpt/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2191, in _execute_internal result: Result[Any] = compile_state_cls.orm_execute_statement( File "/Users/kenneth/anaconda3/envs/db-gpt/lib/python3.10/site-packages/sqlalchemy/orm/context.py", line 293, in orm_execute_statement result = conn.execute( File "/Users/kenneth/anaconda3/envs/db-gpt/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1421, in execute return meth( File "/Users/kenneth/anaconda3/envs/db-gpt/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 514, in _execute_on_connection return connection._execute_clauseelement( File "/Users/kenneth/anaconda3/envs/db-gpt/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1643, in _execute_clauseelement ret = self._execute_context( File "/Users/kenneth/anaconda3/envs/db-gpt/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1849, in _execute_context return self._exec_single_context( File "/Users/kenneth/anaconda3/envs/db-gpt/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1989, in _exec_single_context self._handle_dbapi_exception( File "/Users/kenneth/anaconda3/envs/db-gpt/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 2356, in _handle_dbapi_exception raise sqlalchemy_exception.with_traceback(exc_info[2]) from e File "/Users/kenneth/anaconda3/envs/db-gpt/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1970, in _exec_single_context self.dialect.do_execute( File "/Users/kenneth/anaconda3/envs/db-gpt/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 924, in do_execute cursor.execute(statement, parameters) File "/Users/kenneth/anaconda3/envs/db-gpt/lib/python3.10/site-packages/pymysql/cursors.py", line 153, in execute result = self._query(query) File "/Users/kenneth/anaconda3/envs/db-gpt/lib/python3.10/site-packages/pymysql/cursors.py", line 322, in _query conn.query(q) File "/Users/kenneth/anaconda3/envs/db-gpt/lib/python3.10/site-packages/pymysql/connections.py", line 558, in query self._affected_rows = self._read_query_result(unbuffered=unbuffered) File "/Users/kenneth/anaconda3/envs/db-gpt/lib/python3.10/site-packages/pymysql/connections.py", line 822, in _read_query_result result.read() File "/Users/kenneth/anaconda3/envs/db-gpt/lib/python3.10/site-packages/pymysql/connections.py", line 1200, in read first_packet = self.connection._read_packet() File "/Users/kenneth/anaconda3/envs/db-gpt/lib/python3.10/site-packages/pymysql/connections.py", line 772, in _read_packet packet.raise_for_error() File "/Users/kenneth/anaconda3/envs/db-gpt/lib/python3.10/site-packages/pymysql/protocol.py", line 221, in raise_for_error err.raise_mysql_exception(self._data) File "/Users/kenneth/anaconda3/envs/db-gpt/lib/python3.10/site-packages/pymysql/err.py", line 143, in raise_mysql_exception raise errorclass(errno, errval) sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1054, "Unknown column 'dbgpt_serve_flow.define_type' in 'field list'") [SQL: SELECT dbgpt_serve_flow.id AS dbgpt_serve_flow_id, dbgpt_serve_flow.uid AS dbgpt_serve_flow_uid, dbgpt_serve_flow.dag_id AS dbgpt_serve_flow_dag_id, dbgpt_serve_flow.label AS dbgpt_serve_flow_label, dbgpt_serve_flow.name AS dbgpt_serve_flow_name, dbgpt_serve_flow.flow_category AS dbgpt_serve_flow_flow_category, dbgpt_serve_flow.flow_data AS dbgpt_serve_flow_flow_data, dbgpt_serve_flow.description AS dbgpt_serve_flow_description, dbgpt_serve_flow.state AS dbgpt_serve_flow_state, dbgpt_serve_flow.error_message AS dbgpt_serve_flow_error_message, dbgpt_serve_flow.source AS dbgpt_serve_flow_source, dbgpt_serve_flow.source_url AS dbgpt_serve_flow_source_url, dbgpt_serve_flow.version AS dbgpt_serve_flow_version, dbgpt_serve_flow.define_type AS dbgpt_serve_flow_define_type, dbgpt_serve_flow.editable AS dbgpt_serve_flow_editable, dbgpt_serve_flow.user_name AS dbgpt_serve_flow_user_name, dbgpt_serve_flow.sys_code AS dbgpt_serve_flow_sys_code, dbgpt_serve_flow.gmt_created AS dbgpt_serve_flow_gmt_created, dbgpt_serve_flow.gmt_modified AS dbgpt_serve_flow_gmt_modified FROM dbgpt_serve_flow] (Background on this error at: https://sqlalche.me/e/20/e3q8)

你期望发生什么?

直接运行 v0.5.8版本

如何重现?

直接运行

lnvxswe2

lnvxswe21#

对不起,关于这个问题,执行DDL如下:

ALTER TABLE `dbgpt_serve_flow`
ADD COLUMN  `define_type` varchar(32) COMMENT 'Flow define type(json or python)';
mpbci0fu

mpbci0fu2#

这个问题已经被标记为 stale,因为已经超过30天没有任何活动。

相关问题