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] No module named 'clickhouse_connect' #2301

Open
4 of 15 tasks
shaxiaozz opened this issue Jan 13, 2025 · 2 comments
Open
4 of 15 tasks

[Bug] No module named 'clickhouse_connect' #2301

shaxiaozz opened this issue Jan 13, 2025 · 2 comments
Labels
bug Something isn't working Waiting for reply

Comments

@shaxiaozz
Copy link

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

PRETTY_NAME="Ubuntu 24.04.1 LTS"
NVIDIA A100 80GB PCIe

Models information

LLM_MODEL=vicuna-13b-v1.5

What happened

I added the ClickHouse database source and this error occurred when I clicked save.

2025-01-13 14:14:49 668e9edb038d dbgpt.datasource.manages.connect_config_db[1] INFO Result: <sqlalchemy.engine.cursor.CursorResult object at 0x75b2c35b1000>
2025-01-13 14:14:49 668e9edb038d dbgpt.rag.summary.db_summary_client[1] WARNING default , clickhouse summary error!No module named 'clickhouse_connect', detail: Traceback (most recent calllast):
  File "/app/dbgpt/rag/summary/db_summary_client.py", line 82, in init_db_summary
    self.db_summary_embedding(item["db_name"], item["db_type"])
  File "/app/dbgpt/rag/summary/db_summary_client.py", line 46, in db_summary_embedding
    db_summary_client = self.create_summary_client(dbname, db_type)
  File "/app/dbgpt/rag/summary/db_summary_client.py", line 163, in create_summary_client
    return RdbmsSummary(dbname, db_type)
  File "/app/dbgpt/rag/summary/rdbms_db_summary.py", line 38, in __init__
    self.db = db_manager.get_connector(name)
  File "/app/dbgpt/datasource/manages/connector_manager.py", line 130, in get_connector
    return connect_instance.from_uri_db(  # type: ignore
  File "/app/dbgpt/datasource/rdbms/conn_clickhouse.py", line 57, in from_uri_db
    import clickhouse_connect
ModuleNotFoundError: No module named 'clickhouse_connect'

What you expected to happen

I can solve the problem temporarily by executing the following command:

docker exec -it db-gpt-webserver-1 bash
pip install clickhouse_connect

But when I need to docker compose down, docker compose up -d restart, this error will appear again.

I understand that the clickhouse_connect package should be built into the container

How to reproduce

git clone https://github.com/eosphoros-ai/DB-GPT.git && cd DB-GPT
docker compose up -d
Open the UI, add the clickhouse data source, and click save

Additional context

No response

Are you willing to submit PR?

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

sorry about that, clickhouse_connect is not in dbgpt default datasource. so we have not put ck in container, we recommend you to deploy in source code.

@shaxiaozz
Copy link
Author

@Aries-ckt The same is true for Python virtual environment installation. It is recommended to add clickhouse_connect to the dependencies

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

2 participants