koursaros-ai / nboost

NBoost is a scalable, search-api-boosting platform for deploying transformer models to improve the relevance of search results on different platforms (i.e. Elasticsearch)
Apache License 2.0
674 stars 69 forks source link

Unable to open database file #61

Closed ilham-bintang closed 4 years ago

ilham-bintang commented 4 years ago

Hi, I have tried to run nboost and encounter database issue (error message: unable to open database file)

This is my step:

it returning:

{"doc":null,"msg":"('unable to open database file',)","type":"OperationalError"}

am I missing any step?

I guess this is because I did not have the nboost.db file (and I did not find it in this repo)

Fogggy commented 4 years ago

@nullphantom I've faced such an error. I've fixed it by creating /usr/local/lib/python3.7/site-packages/nboost/.cache folder.

ilham-bintang commented 4 years ago

@nullphantom I've faced such an error. I've fixed it by creating /usr/local/lib/python3.7/site-packages/nboost/.cache folder.

did you run on local or with docker?

groupbwt-admin commented 4 years ago

@nullphantom I've faced such an error. I've fixed it by creating /usr/local/lib/python3.7/site-packages/nboost/.cache folder.

did you run on local or with docker?

local

ilham-bintang commented 4 years ago

@nullphantom I've faced such an error. I've fixed it by creating /usr/local/lib/python3.7/site-packages/nboost/.cache folder.

did you run on local or with docker?

local

Still can not. My step:

rajeshkp commented 4 years ago

We are running into the above issue as well

klasocki commented 4 years ago

I run into the same error with the same steps, but when I made the .cache directory in my nboost folder I got a different error when trying to reach localhost:8000/nboost/status:

{"doc":null,"msg":"('no such table: searches',)","type":"OperationalError"}

Here is the traceback from the new error (after creating .cache):

Traceback (most recent call last): File "/net/scratch/people/plgklasocki/transformers-env/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/net/scratch/people/plgklasocki/transformers-env/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/net/scratch/people/plgklasocki/transformers-env/lib/python3.6/site-packages/nboost/proxy.py", line 78, in status_path stats = db.get_stats() File "/net/scratch/people/plgklasocki/transformers-env/lib/python3.6/site-packages/nboost/database.py", line 68, in get_stats ''').fetchone() sqlite3.OperationalError: no such table: searches

And here is the old traceback, before creating .cache, since it wasn't attached yet:

Traceback (most recent call last): File "/net/scratch/people/plgklasocki/transformers-env/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/net/scratch/people/plgklasocki/transformers-env/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/net/scratch/people/plgklasocki/transformers-env/lib/python3.6/site-packages/nboost/proxy.py ", line 78, in status_path stats = db.get_stats() File "/net/scratch/people/plgklasocki/transformers-env/lib/python3.6/site-packages/nboost/database .py", line 58, in get_stats cursor = self.get_cursor() File "/net/scratch/people/plgklasocki/transformers-env/lib/python3.6/site-packages/nboost/database .py", line 16, in get_cursor conn = sqlite3.connect(str(self.db_file), isolation_level=None) sqlite3.OperationalError: unable to open database file

ilham-bintang commented 4 years ago

I run into the same error with the same steps, but when I made the .cache directory in my nboost folder I got a different error when trying to reach localhost:8000/nboost/status:

{"doc":null,"msg":"('no such table: searches',)","type":"OperationalError"}

Here is the traceback from the new error (after creating .cache):

Traceback (most recent call last): File "/net/scratch/people/plgklasocki/transformers-env/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/net/scratch/people/plgklasocki/transformers-env/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/net/scratch/people/plgklasocki/transformers-env/lib/python3.6/site-packages/nboost/proxy.py", line 78, in status_path stats = db.get_stats() File "/net/scratch/people/plgklasocki/transformers-env/lib/python3.6/site-packages/nboost/database.py", line 68, in get_stats ''').fetchone() sqlite3.OperationalError: no such table: searches

And here is the old traceback, before creating .cache, since it wasn't attached yet:

Traceback (most recent call last): File "/net/scratch/people/plgklasocki/transformers-env/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/net/scratch/people/plgklasocki/transformers-env/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/net/scratch/people/plgklasocki/transformers-env/lib/python3.6/site-packages/nboost/proxy.py ", line 78, in status_path stats = db.get_stats() File "/net/scratch/people/plgklasocki/transformers-env/lib/python3.6/site-packages/nboost/database .py", line 58, in get_stats cursor = self.get_cursor() File "/net/scratch/people/plgklasocki/transformers-env/lib/python3.6/site-packages/nboost/database .py", line 16, in get_cursor conn = sqlite3.connect(str(self.db_file), isolation_level=None) sqlite3.OperationalError: unable to open database file

I got same issue also when create .cache dir probably we did not have the database schema

kaykanloo commented 4 years ago

If I'm not mistaken, thesqlite3.OperationalError: no such table: searches error is unrelated to the sqlite3.OperationalError: unable to open database file error. Creating the .cache directory should fix the original issue. To avoid the no such table: searches error: