-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Describe the bug
Following the kg-cookiecutter README, the command “poetry run kg import --data-dir data” gives the error:
duckdb.duckdb.ConnectionException: Connection Error: Can't open a connection to same database file with a different configuration than existing connections
...
sqlalchemy.exc.OperationalError: (duckdb.duckdb.ConnectionException) …
To reproduce
Environment: macOS/Python 3.11
Prior successful setup following kg-cookiecutter README up through and including “poetry install -E chat” using included sample data.
Expected behavior
Import of data succeeds and “Import process finished.” is output to user.
Additional context
Error originates from:
file: kg_hub/kg_proj/kg_proj/run.py
impl = get_database_impl(database, data_dir=data_dir, llm_config=config)
file: kg_chat/utils.py
return DuckDBImplementation(data_dir=data_dir, llm_config=llm_config)
I reviewed the related duckdb_implementation.py file but couldn’t determine how it manages concurrent DB access or configuration mismatches.
The sample data ends up in data/merged/merged-kg.tar.gz. I expanded it, renamed the files to nodes.tsv and edges.tsv (per README), and moved them directly into data. Also tried removing other directories in data. Still encountered the same error in both cases.
Describe the bug
Following the kg-chat README, interactive chat launches but every query results in:
Invalid Format: Missing ‘Action:’ after ‘Thought: I don’t know.’
This loops until the session times out, reaches the max iteration limit, or returns ‘I don’t know’ as final response.
To reproduce
Environment: macOS/Python 3.11
Prior successful set up following kg-chat README, General Setup For Developers using included sample data, and separately, sample data from kg-cookiecutter.
Expected behavior
Data is queried and relevant information is included in coherent response when query is relevant, or response states that the requested information is not contained in the data.
Additional context
This was a separate instance of kg-chat.
Queries made were relevant to database contents (e.g., microbes, then conditions/environments).
Work around
Following the setup from kg-cookiecutter, I tried switching from DuckDB to Neo4j by modifying the run.py file and adding my login to constants.py. This was successful (i.e., import and chat ran successfully, responses included relevant information)! An error line still print before the output but doesn’t obviously cause issues:
Error in StdOutCallbackHandler.on_chain_start callback: AttributeError("'NoneType' object has no attribute 'get'")