sqlite3.OperationalError: unable to open database file, when building local database
Hi,
I am trying to create a local database but sqlite3 keeps showing this error.
This ts the log file: cblaster_makedb.14511790.4294967294.log
This is the code:
cblaster makedb
--cpus 24
--name cmx_nob_genomes_db
AB588176.1.gbk
This is the working directory:
Please help me solve this issue! Big thanks!
As another thread mentioned, this might be a problem with your libsqlite. What version do you have installed?
Also, just a hint, but you don't need to use 24 cpus to build a database from one genome!!
Hi!
So I did some more digging. The most reliable fix was to roll back to cblaster version 1.3.10. I'm not sure what was changed that broke the database creation in the recent versions but I will try and take a look.
FYI @gamcil
So, I did a bit more digging with a colleague of mine and we discovered that this is a problem with genomicsqlite. Since, you don't actually need it to run cblaster (it will fallback to pythons default sqlite). So the easiest fix to use the current version is to use:
pip uninstall genomicsqlite
I think this may have been fixed by https://github.com/gamcil/cblaster/pull/111 which explicitly forces sqlite transactions to be committed. I can reproduce the issue using the current v1.3.20 release, but not on the current master with that change. Otherwise, @drboothtj is correct that genomicsqlite is not necessary and cblaster will fall back to the default Python library if genomicsqlite is not found, so uninstalling it is also an option, but this can lead to another problem on the searching side since a database created with genomicsqlite cannot be used with the default sqlite library.