Closed silenus092 closed 2 years ago
In GitLab by @kunaphas.kon on Jan 11, 2022, 23:10
Hi @oliverdrechsel ,
Thank you for your report
If you don't mind, can you provide the command and related files to generate this error?🐛
Then, we can reproduce this error and enhance it properly.
Thanks
In GitLab by @kunaphas.kon on Jan 13, 2022, 14:20
Ok, thank you @oliverdrechsel
so next time if we get an error during the add command, it will report the error with the causal ID.
(Error while processing ID: {#ID}")
For example
Error while processing ID: 'XXX-negative-XXX-01'
# and then follow with raising an exception as usual
warning:
Traceback (most recent call last):
File "/covsonar/lib/sonardb.py", line 2258, in import_genome_from_cache
self.import_genome(**preprocessed_data, seq=seq, dbm=dbm)
File "/covsonar/lib/sonardb.py", line 2307, in import_genome
raise er
File "/covsonar/lib/sonardb.py", line 2292, in import_genome
dbm.insert_genome(acc, descr, seqhash)
File "/covsonar/lib/sonardb.py", line 1310, in insert_genome
self.cursor.execute(sql, [acc, descr, seqhash])
sqlite3.IntegrityError: UNIQUE constraint failed: genome.accession
if this ok, I will put this update into the next covSonar update
In GitLab by @oliverdrechsel on Jan 6, 2022, 10:45
If covsonar hits non-unique ids in building database it fails. That's perfect. A helpful hint would be, if it would state the violating id.