MrTomRod / scoary-2

Calculate assocations between genes and traits
MIT License
19 stars 1 forks source link

sqlite3.OperationalError: database is locked #8

Closed samuelmontgomery closed 4 months ago

samuelmontgomery commented 8 months ago

Hi,

I am testing out Scoary-2 on some data I have previously used Scoary with, and I am getting the following error while it is running (but it does keep going)

Process Process-12: Traceback (most recent call last): File "/home/ubuntu/scratch/software/miniforge3/envs/scoary2/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap self.run() File "/home/ubuntu/scratch/software/miniforge3/envs/scoary2/lib/python3.10/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/home/ubuntu/scratch/software/miniforge3/envs/scoary2/lib/python3.10/site-packages/scoary/analyze_trait.py", line 48, in worker local_result_container[trait] = analyze_trait_fn(trait, new_ns, proc_id) File "/home/ubuntu/scratch/software/miniforge3/envs/scoary2/lib/python3.10/site-packages/scoary/analyze_trait.py", line 165, in analyze_trait_step_2_pairpicking result_df['empirical_p'] = permute_picking( File "/home/ubuntu/scratch/software/miniforge3/envs/scoary2/lib/python3.10/site-packages/scoary/permutations.py", line 97, in permute_picking CONFINT_CACHE.set(unique_topology, n_pos_assoc, n_permut, permuted_estimators) File "/home/ubuntu/scratch/software/miniforge3/envs/scoary2/lib/python3.10/site-packages/scoary/permutations.py", line 36, in set self.cur.execute( sqlite3.OperationalError: database is locked

This appears multiple times for different processes while running pair picking

MrTomRod commented 8 months ago

Hm, try setting the environment variable CONFINT_DB to somewhere you have write permission. E.g.:

export CONFINT_DB=/tmp/CONFINT_DB
MrTomRod commented 6 months ago

Did it solve your issue?

MrTomRod commented 4 months ago

I assume this solved the issue.