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] [Module Name] Bug title #2280

Open
3 of 15 tasks
JV-X opened this issue Jan 6, 2025 · 4 comments
Open
3 of 15 tasks

[Bug] [Module Name] Bug title #2280

JV-X opened this issue Jan 6, 2025 · 4 comments
Labels
bug Something isn't working Waiting for reply

Comments

@JV-X
Copy link

JV-X commented Jan 6, 2025

Search before asking

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

Operating system information

Linux

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: i9 14900KF
GPU: RTX-4090D 24G

Models information

LLM_MODEL=chatgpt_proxyllm

What happened

I followed the http://docs.dbgpt.cn/docs/quickstart document to build the DB-GPT environment, but when I executed python dbgpt/app/dbgpt_server.py, I got the following error,:

dbgpt.core.awel.dag.dag_manager.DAGManager object at 0x7fdffa1b4310>
Traceback (most recent call last):
  File "/home/hygx/anaconda3/envs/dbgpt_env/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1970, in _exec_single_context
    self.dialect.do_execute(
  File "/home/hygx/anaconda3/envs/dbgpt_env/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 924, in do_execute
    cursor.execute(statement, parameters)
sqlite3.OperationalError: no such table: gpts_app_collection

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/hygx/code/DB-GPT/dbgpt/app/dbgpt_server.py", line 289, in <module>
    run_webserver()
  File "/home/hygx/code/DB-GPT/dbgpt/app/dbgpt_server.py", line 275, in run_webserver
    param = initialize_app(param)
  File "/home/hygx/code/DB-GPT/dbgpt/app/dbgpt_server.py", line 171, in initialize_app
    initialize_components(
  File "/home/hygx/code/DB-GPT/dbgpt/app/component_configs.py", line 58, in initialize_components
    _initialize_resource_manager(system_app)
  File "/home/hygx/code/DB-GPT/dbgpt/app/component_configs.py", line 109, in _initialize_resource_manager
    from dbgpt.agent.resource.app import AppResource
  File "/home/hygx/code/DB-GPT/dbgpt/agent/resource/app.py", line 28, in <module>
    class AppResourceParameters(ResourceParameters):
  File "/home/hygx/code/DB-GPT/dbgpt/agent/resource/app.py", line 34, in AppResourceParameters
    "valid_values": _get_app_list(),
  File "/home/hygx/code/DB-GPT/dbgpt/agent/resource/app.py", line 15, in _get_app_list
    apps = get_app_manager().get_dbgpts()
  File "/home/hygx/code/DB-GPT/dbgpt/serve/agent/agents/app_agent_manage.py", line 57, in get_dbgpts
    apps = self.gpts_app.app_list(
  File "/home/hygx/code/DB-GPT/dbgpt/serve/agent/db/gpts_app.py", line 584, in app_list
    gpts_collections = collection_dao.list(
  File "/home/hygx/code/DB-GPT/dbgpt/serve/agent/db/gpts_app.py", line 531, in list
    res = app_qry.all()
  File "/home/hygx/anaconda3/envs/dbgpt_env/lib/python3.10/site-packages/sqlalchemy/orm/query.py", line 2673, in all
    return self._iter().all()  # type: ignore
  File "/home/hygx/anaconda3/envs/dbgpt_env/lib/python3.10/site-packages/sqlalchemy/orm/query.py", line 2827, in _iter
    result: Union[ScalarResult[_T], Result[_T]] = self.session.execute(
  File "/home/hygx/anaconda3/envs/dbgpt_env/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2306, in execute
    return self._execute_internal(
  File "/home/hygx/anaconda3/envs/dbgpt_env/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 2191, in _execute_internal
    result: Result[Any] = compile_state_cls.orm_execute_statement(
  File "/home/hygx/anaconda3/envs/dbgpt_env/lib/python3.10/site-packages/sqlalchemy/orm/context.py", line 293, in orm_execute_statement
    result = conn.execute(
  File "/home/hygx/anaconda3/envs/dbgpt_env/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1421, in execute
    return meth(
  File "/home/hygx/anaconda3/envs/dbgpt_env/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 514, in _execute_on_connection
    return connection._execute_clauseelement(
  File "/home/hygx/anaconda3/envs/dbgpt_env/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1643, in _execute_clauseelement
    ret = self._execute_context(
  File "/home/hygx/anaconda3/envs/dbgpt_env/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1849, in _execute_context
    return self._exec_single_context(
  File "/home/hygx/anaconda3/envs/dbgpt_env/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1989, in _exec_single_context
    self._handle_dbapi_exception(
  File "/home/hygx/anaconda3/envs/dbgpt_env/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 "/home/hygx/anaconda3/envs/dbgpt_env/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1970, in _exec_single_context
    self.dialect.do_execute(
  File "/home/hygx/anaconda3/envs/dbgpt_env/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 924, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: gpts_app_collection
[SQL: SELECT gpts_app_collection.id AS gpts_app_collection_id, gpts_app_collection.app_code AS gpts_app_collection_app_code, gpts_app_collection.user_code AS gpts_app_collection_user_code, gpts_app_collection.sys_code AS gpts_app_collection_sys_code, gpts_app_collection.created_at AS gpts_app_collection_created_at, gpts_app_collection.updated_at AS gpts_app_collection_updated_at
FROM gpts_app_collection]
(Background on this error at: https://sqlalche.me/e/20/e3q8)

I saw a similar problem in the issue #1800 , but his LOCAL_DB_TYPE is different from mine. My LOCAL_DB_TYPE is sqlite. How should I deal with this problem?

What you expected to happen

DB-GPT is operating normally

How to reproduce

just follow the doc : http://docs.dbgpt.cn/docs/quickstart

Additional context

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@JV-X JV-X added bug Something isn't working Waiting for reply labels Jan 6, 2025
@Aries-ckt
Copy link
Collaborator

Hi, thanks for your feedback. It’s weird, so now you can check your SQLite schema with dbgpt.sql, create table gpts_app_collection manually

@SKKKKYLAR
Copy link

SKKKKYLAR commented Jan 7, 2025

I'm` having the same issue, how should I resolve it? Additionally, are these settings still effective even though they are commented out?

LOCAL_DB_TYPE=sqlite
The following are all comments.

## MYSQL database

LOCAL_DB_TYPE=mysql

LOCAL_DB_USER=root

LOCAL_DB_PASSWORD={your_password}

LOCAL_DB_HOST=127.0.0.1

LOCAL_DB_PORT=3306

LOCAL_DB_NAME=dbgpt

## This option determines the storage location of conversation records. The default is not configured to the old version of duckdb. It can be optionally db or file (if the value is db, the database configured by LOCAL_DB will be used)

CHAT_HISTORY_STORE_TYPE=db

I'm having the same issue, how should I resolve it? Additionally, are these settings still effective even though they are commented out?

@JV-X
Copy link
Author

JV-X commented Jan 7, 2025

I'm` having the same issue, how should I resolve it? Additionally, are these settings still effective even though they are commented out?

LOCAL_DB_TYPE=sqlite The following are all comments.

## MYSQL database

LOCAL_DB_TYPE=mysql

LOCAL_DB_USER=root

LOCAL_DB_PASSWORD={your_password}

LOCAL_DB_HOST=127.0.0.1

LOCAL_DB_PORT=3306

LOCAL_DB_NAME=dbgpt

## This option determines the storage location of conversation records. The default is not configured to the old version of duckdb. It can be optionally db or file (if the value is db, the database configured by LOCAL_DB will be used)

CHAT_HISTORY_STORE_TYPE=db

I'm having the same issue, how should I resolve it? Additionally, are these settings still effective even though they are commented out?

Change the database type to mysql, and then manually execute assets/schema/dbgpt.sql in the database.

@Aries-ckt
Copy link
Collaborator

yeah, local_db_type=mysql will require you execute dbgpt.sql manually.

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

3 participants