google / model_search

Apache License 2.0
3.26k stars 462 forks source link

RuntimeError: Cannot connect sqlite3 database: unable to open database file #31

Open Mrmdzz opened 3 years ago

Mrmdzz commented 3 years ago

Is there any solution to this problem?

KevinRyu commented 3 years ago

https://github.com/google/model_search/issues/27#issuecomment-788219838

This closed solution doesn't work for me.

Mrmdzz commented 3 years ago

After the version was updated, there was still the same problem, and #27 didn't help me

KevinRyu commented 3 years ago

After the version was updated, there was still the same problem, and #27 didn't help me

I found the problem and solved it. I made directory name like "c:/tmp/filedb-352355" 352355 is random value from 0 to 1000000. (We can find this code in ml_metadata_db.py line 102)

Running started... I wish this tips is helpful.

Mrmdzz commented 3 years ago

I see. Thanks! @KevinRyu

ird-tue commented 3 years ago

I followed the above the suggestions, and it solved 'Cannot connect sqlite3...' error but produced another runtime error on the same line:

self._metadata_store = metadata_store_serialized.CreateMetadataStore( RuntimeError: Error when executing query: file is not a database query: CREATE TABLE IF NOT EXISTS Type ( id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(255) NOT NULL, version VARCHAR(255), type_kind TINYINT(1) NOT NULL, description TEXT, input_type TEXT, output_type TEXT );