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] [ChatData] editor run sql error #826

Closed
3 of 15 tasks
danerlt opened this issue Nov 23, 2023 · 8 comments
Closed
3 of 15 tasks

Bug] [ChatData] editor run sql error #826

danerlt opened this issue Nov 23, 2023 · 8 comments
Labels
bug Something isn't working stale Waiting for reply

Comments

@danerlt
Copy link

danerlt commented Nov 23, 2023

Search before asking

  • 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

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

Installation Information

Device information

CPU

Models information

LLM: proxyllm

What happened

使用默认的样例数据,在ChatData输入问题 查询所有学生的姓名,专业和成绩,按成绩降序排序,在edito中将生成的sql中limit 50修改成limit 10,然后点击右上角的Run,报错了。
image

错误信息如下:

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!
@danerlt danerlt added bug Something isn't working Waiting for reply labels Nov 23, 2023
@csunny
Copy link
Collaborator

csunny commented Nov 24, 2023

Yes, this will be fixed later, you can find from here

@Edisonwei54
Copy link

是的,这将在以后修复,您可以从这里找到

请问修复了吗?我使用最新版本,还是遇到了同样的问题

@fangyinc fangyinc changed the title [Bug] [ChatData] editor run sql error [Feature] [ChatData] Dynamically update data source information Nov 26, 2023
@fangyinc fangyinc changed the title [Feature] [ChatData] Dynamically update data source information Bug] [ChatData] editor run sql error Nov 26, 2023
@alineware
Copy link

I have the same issue, will this be fixed in the next version?

Copy link

This issue has been marked as stale, because it has been over 30 days without any activity.

@github-actions github-actions bot added the stale label Dec 27, 2023
Copy link

github-actions bot commented Jan 4, 2024

This issue bas been closed, because it has been marked as stale and there has been no activity for over 7 days.

@github-actions github-actions bot closed this as completed Jan 4, 2024
@huaji23
Copy link

huaji23 commented Feb 29, 2024

请问修复了吗?我使用最新版本,还是遇到了同样的问题

@njhouse365
Copy link

截图 2024-03-11 15-30-11
我咋没有编辑模式 呢

@sky1417168
Copy link

我也遇到了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale Waiting for reply
Projects
None yet
Development

No branches or pull requests

7 participants