Eu tenho um snakefile com uma regra que importa um script Python local e, em seguida, levanta uma RuntimeError
. Quando eu executar o snakefile, o rastreamento de pilha para o RuntimeError
não é mostrado. O código e saída snakemake são mostrados abaixo.
// test.snakefile
rule test_rule:
run:
from test import hello
print(hello)
raise RuntimeError('raising error')
// test.py
import logging
import os
from logging.config import fileConfig
log_file_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'logging_config.ini')
fileConfig(log_file_path)
hello = 'hello'
saída snakemake:
...
[Mon Jan 13 14:45:54 2020]
rule test_rule:
jobid: 0
Job counts:
count jobs
1 test_rule
1
hello
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
No entanto, se eu comente a linha fileConfig(log_file_path)
em test.py
e snakemake executado, o RuntimeError pilha de rastreamento é impresso como esperado:
Error in rule test_rule:
jobid: 0
RuleException:
RuntimeError in line 5 of /my-dir/test.snakefile:
raising error
File /my-dir/test.snakefile, line 5, in __rule_test_rule
File /usr/lib/python3.6/concurrent/futures/thread.py, line 56, in run
Exiting because a job execution failed. Look above for error message
Alguém sabe por que isso ocorre?