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] [Datasource API] Call list datasources api returns error #1788

Closed
4 of 15 tasks
chaplinthink opened this issue Aug 7, 2024 · 2 comments · May be fixed by #1789
Closed
4 of 15 tasks

[Bug] [Datasource API] Call list datasources api returns error #1788

chaplinthink opened this issue Aug 7, 2024 · 2 comments · May be fixed by #1789
Labels
bug Something isn't working stale Waiting for reply

Comments

@chaplinthink
Copy link
Contributor

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

LLM: zhipu_proxyllm

What happened

When i call list_datasource return the follow errors:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\software\PyCharm 2023.3.5\plugins\python\helpers-pro\pydevd_asyncio\pydevd_nest_asyncio.py", line 120, in run
    return loop.run_until_complete(task)
  File "D:\software\PyCharm 2023.3.5\plugins\python\helpers-pro\pydevd_asyncio\pydevd_nest_asyncio.py", line 211, in run_until_complete
    return f.result()
  File "C:\Users\jack\AppData\Local\Programs\Python\Python310\lib\asyncio\futures.py", line 201, in result
    raise self._exception.with_traceback(self._exception_tb)
  File "C:\Users\jack\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 232, in __step
    result = coro.send(None)
  File "C:\Users\jack\PycharmProjects\dbgpt-test\api\datasource.py", line 12, in list_ds
    res = await list_datasource(client=client)
  File "C:\Users\jack\PycharmProjects\dbgpt-test\.venv\lib\site-packages\dbgpt\client\datasource.py", line 120, in list_datasource
    raise ClientException(f"Failed to list datasource: {e}")
dbgpt.client.client.ClientException: (Failed to list datasource: (E0003)
Reason: {'success': False, 'err_code': 'E0003', 'err_msg': "1 validation errors:\n  {'type': 'model_attributes_type', 'loc': ('response', 'data'), 'msg': 'Input should be a valid dictionary or object to extract fields from', 'input': [DatasourceServeResponse(id=1, db_type='mysql', db_name='dbgpt_test', db_path='', db_host='10.0.67.230', db_port=3306, db_user='zhangwei', db_pwd='zhangwei', comment='')]}\n", 'data': None}
)
Reason: None

What you expected to happen

API endpoint returns incorrect data type

image

How to reproduce

async def list_ds():
    res = await list_datasource(client=client)
    print(res)

Additional context

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
Copy link

github-actions bot commented Sep 6, 2024

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 Sep 6, 2024
Copy link

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

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

Successfully merging a pull request may close this issue.

1 participant