obi import: skip on error more robust

This commit is contained in:
Celine Mercier
2020-05-28 20:40:36 +02:00
parent a7dcf16c06
commit 6094ce2bbc

View File

@ -270,6 +270,8 @@ def run(config):
elif not i%50000:
logger("info", "Imported %d entries", i)
try:
if NUC_SEQS_view:
id_col[i] = entry.id
def_col[i] = entry.definition
@ -388,6 +390,13 @@ def run(config):
# Fill value
dcols[tag][0][i] = value
except Exception as e:
print("\nCould not import sequence id:", entry.id, "(error raised:", e, ")")
if 'skiperror' in config['obi'] and not config['obi']['skiperror']:
raise e
else:
pass
i+=1
if pb is not None: