eosphoros-ai/DB-GPT

DBGPT部署本地找不到neo4j

Closed this issue · 2 comments

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

2 * A100

Models information

deepseek + m3e embedding

What happened

本地python环境及conda虚拟环境已安装neo4j,但还是找不到
image

What you expected to happen

1

How to reproduce

1

Additional context

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

INFO: 192.168.32.1:46152 - "POST /api/v1/chat/completions HTTP/1.1" 400 Bad Request
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/app/dbgpt/datasource/conn_tugraph.py", line 46, in from_uri_db
from neo4j import GraphDatabase
ModuleNotFoundError: No module named 'neo4j'

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

Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/httptools_impl.py", line 399, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/usr/local/lib/python3.10/dist-packages/uvicorn/middleware/proxy_headers.py", line 70, in call
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/cors.py", line 93, in call
await self.simple_response(scope, receive, send, request_headers=headers)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/cors.py", line 148, in simple_response
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/fastapi/applications.py", line 1054, in call
await super().call(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/applications.py", line 123, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 186, in call
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 164, in call
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 189, in call
with collapse_excgroups():
File "/usr/lib/python3.10/contextlib.py", line 153, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.10/dist-packages/starlette/_utils.py", line 93, in collapse_excgroups
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 191, in call
response = await self.dispatch_func(request, call_next)
File "/app/dbgpt/util/tracer/tracer_middleware.py", line 44, in dispatch
response = await call_next(request)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 165, in call_next
raise app_exc
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 151, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py", line 65, in call
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 756, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 776, in app
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 297, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 77, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 72, in app
response = await func(request)
File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 278, in app
raw_response = await run_endpoint_function(
File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 191, in run_endpoint_function
return await dependant.call(**values)
File "/app/dbgpt/app/openapi/api_v1/api_v1.py", line 387, in chat_completions
chat: BaseChat = await get_chat_instance(dialogue)
File "/app/dbgpt/app/openapi/api_v1/api_v1.py", line 312, in get_chat_instance
chat: BaseChat = await blocking_func_to_async(
File "/app/dbgpt/util/executor_utils.py", line 67, in blocking_func_to_async
return await loop.run_in_executor(executor, run_with_context)
File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/app/dbgpt/util/executor_utils.py", line 64, in run_with_context
return ctx.run(partial(func, *args, **kwargs))
File "/app/dbgpt/app/scene/chat_factory.py", line 41, in get_implementation
implementation = cls(**kwargs)
File "/app/dbgpt/app/scene/chat_db/auto_execute/chat.py", line 40, in init
self.database = CFG.local_db_manager.get_connector(self.db_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/conn_tugraph.py", line 54, in from_uri_db
raise ImportError(
ImportError: neo4j package is not installed, please install it with pip install neo4j

tugraph is ready
image