llmware-ai / llmware-ai/llmware
sqlite3.OperationalError: unable to open database file
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.8k
- Forks
- 2.9k
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
Actually even if you setup the location of llmware_data (in my case it looks like this : `LLMWareConfig.set_home("D:\\myapp\\"`)), it keeps looking for it in `C:\users\\llmware_data`.
As consequence, I should keep 2 llmware_data folders which from point of view is lead to inconsistencies.
the issue :
```
Traceback (most recent call last):
File "d:\IntellicatSearch\semantic_reranker.py", line 199, in
library = Library().load_library(library_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\IntellicatSearch\intellicatsearch_env\Lib\site-packages\llmware\library.py", line 266, in load_library
library_exists = self.check_if_library_exists(library_name, account_name=account_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\IntellicatSearch\intellicatsearch_env\Lib\site-packages\llmware\library.py", line 349, in check_if_library_exists
library_card = LibraryCatalog().get_library_card(library_name, account_name=account_name)
^^^^^^^^^^^^^^^^
File "d:\IntellicatSearch\intellicatsearch_env\Lib\site-packages\llmware\library.py", line 1291, in __init__
if CollectionWriter("library",account_name=self.account_name).check_if_table_build_required():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\IntellicatSearch\intellicatsearch_env\Lib\site-packages\llmware\resources.py", line 228, in __init__
self._writer = SQLiteWriter(self.library_name, account_name=self.account_name, custom_table=custom_table,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\IntellicatSearch\intellicatsearch_env\Lib\site-packages\llmware\resources.py", line 2564, in __init__
self.conn = _SQLiteConnect().connect(library_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\IntellicatSearch\intellicatsearch_env\Lib\site-packages\llmware\resources.py", line 3083, in connect
self.conn = sqlite3.connect(db_file)
^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: unable to open database file
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting LLMWareConfig.set_home and the SQLite connection path in resources.py, especially _SQLiteConnect.connect. Reproduce the Windows configuration with a custom home directory and trace which database path is used. Done means SQLite opens the configured llmware_data location consistently without requiring a second default folder.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, sqlite
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100