DB-GPT
DB-GPT copied to clipboard
Bug] [ChatData] editor run sql error
Search before asking
- [X] I had searched in the issues and found no similar issues.
Operating system information
Windows
Python version information
3.10
DB-GPT version
main
Related scenes
- [X] Chat Data
- [ ] Chat Excel
- [ ] Chat DB
- [ ] Chat Knowledge
- [ ] Model Management
- [ ] Dashboard
- [ ] Plugins
Installation Information
-
[ ] AutoDL Image
-
[ ] Other
Device information
CPU
Models information
LLM: proxyllm
What happened
使用默认的样例数据,在ChatData输入问题 查询所有学生的姓名,专业和成绩,按成绩降序排序
,在edito中将生成的sql中limit 50
修改成limit 10
,然后点击右上角的Run,报错了。
错误信息如下:
INFO [pilot.openapi.api_v1.editor.api_editor_v1] editor_sql_run:{'db_name': 'case_1_student_manager'}
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "D:\ProgramData\Anaconda3\envs\DB-GPT\lib\site-packages\anyio\streams\memory.py", line 98, in receive
return self.receive_nowait()
File "D:\ProgramData\Anaconda3\envs\DB-GPT\lib\site-packages\anyio\streams\memory.py", line 93, in receive_nowait
raise WouldBlock
anyio.WouldBlock
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\ProgramData\Anaconda3\envs\DB-GPT\lib\site-packages\starlette\middleware\base.py", line 78, in call_next
message = await recv_stream.receive()
File "D:\ProgramData\Anaconda3\envs\DB-GPT\lib\site-packages\anyio\streams\memory.py", line 118, in receive
raise EndOfStream
anyio.EndOfStream
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\ProgramData\Anaconda3\envs\DB-GPT\lib\site-packages\uvicorn\protocols\http\httptools_impl.py", line 426, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "D:\ProgramData\Anaconda3\envs\DB-GPT\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 84, in __call__
return await self.app(scope, receive, send)
File "D:\ProgramData\Anaconda3\envs\DB-GPT\lib\site-packages\fastapi\applications.py", line 284, in __call__
await super().__call__(scope, receive, send)
File "D:\ProgramData\Anaconda3\envs\DB-GPT\lib\site-packages\starlette\applications.py", line 122, in __call__
await self.middleware_stack(scope, receive, send)
File "D:\ProgramData\Anaconda3\envs\DB-GPT\lib\site-packages\starlette\middleware\errors.py", line 184, in __call__
raise exc
File "D:\ProgramData\Anaconda3\envs\DB-GPT\lib\site-packages\starlette\middleware\errors.py", line 162, in __call__
await self.app(scope, receive, _send)
File "D:\ProgramData\Anaconda3\envs\DB-GPT\lib\site-packages\starlette\middleware\base.py", line 108, in __call__
response = await self.dispatch_func(request, call_next)
File "D:\work\algo\大语言模型\DB-GPT\pilot\utils\tracer\tracer_middleware.py", line 44, in dispatch
response = await call_next(request)
File "D:\ProgramData\Anaconda3\envs\DB-GPT\lib\site-packages\starlette\middleware\base.py", line 84, in call_next
raise app_exc
File "D:\ProgramData\Anaconda3\envs\DB-GPT\lib\site-packages\starlette\middleware\base.py", line 70, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "D:\ProgramData\Anaconda3\envs\DB-GPT\lib\site-packages\starlette\middleware\cors.py", line 91, in __call__
await self.simple_response(scope, receive, send, request_headers=headers)
File "D:\ProgramData\Anaconda3\envs\DB-GPT\lib\site-packages\starlette\middleware\cors.py", line 146, in simple_response
await self.app(scope, receive, send)
File "D:\ProgramData\Anaconda3\envs\DB-GPT\lib\site-packages\starlette\middleware\exceptions.py", line 79, in __call__
raise exc
File "D:\ProgramData\Anaconda3\envs\DB-GPT\lib\site-packages\starlette\middleware\exceptions.py", line 68, in __call__
await self.app(scope, receive, sender)
File "D:\ProgramData\Anaconda3\envs\DB-GPT\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 20, in __call__
raise e
File "D:\ProgramData\Anaconda3\envs\DB-GPT\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 17, in __call__
await self.app(scope, receive, send)
File "D:\ProgramData\Anaconda3\envs\DB-GPT\lib\site-packages\starlette\routing.py", line 718, in __call__
await route.handle(scope, receive, send)
File "D:\ProgramData\Anaconda3\envs\DB-GPT\lib\site-packages\starlette\routing.py", line 276, in handle
await self.app(scope, receive, send)
File "D:\ProgramData\Anaconda3\envs\DB-GPT\lib\site-packages\starlette\routing.py", line 66, in app
response = await func(request)
File "D:\ProgramData\Anaconda3\envs\DB-GPT\lib\site-packages\fastapi\routing.py", line 241, in app
raw_response = await run_endpoint_function(
File "D:\ProgramData\Anaconda3\envs\DB-GPT\lib\site-packages\fastapi\routing.py", line 167, in run_endpoint_function
return await dependant.call(**values)
File "D:\work\algo\大语言模型\DB-GPT\pilot\openapi\api_v1\editor\api_editor_v1.py", line 117, in editor_sql_run
sql = run_param["sql"]
KeyError: 'sql'
What you expected to happen
正常运行SQL
How to reproduce
见上面的描述
Additional context
No response
Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
Yes, this will be fixed later, you can find from here
I have the same issue, will this be fixed in the next version?
This issue has been marked as stale
, because it has been over 30 days without any activity.
This issue bas been closed, because it has been marked as stale
and there has been no activity for over 7 days.
请问修复了吗?我使用最新版本,还是遇到了同样的问题
我咋没有编辑模式 呢
我也遇到了