Skip to content
Snippets Groups Projects
Commit 8ab33d12 authored by mjbonifa's avatar mjbonifa
Browse files

fixed empty output exception as it did not print the config file path

parent 315be709
No related branches found
No related tags found
No related merge requests found
......@@ -380,10 +380,10 @@ def preprocess(df, file, target_code_type=None, codes_file=None, translate=True,
if target_code_type and not translate:
# QA only on target codes
if target_code_type in file[columns]:
if target_code_type in file['columns']:
logger.info(f"Processing {target_code_type} Codes...")
out = preprocess_code(out=out,
codes=df[file[columns][target_code_type]].dropna(),
codes=df[file['columns'][target_code_type]].dropna(),
codes_file=codes_file,
checker=parse.code_types[target_code_type],
output_col=target_code_type,
......@@ -534,7 +534,7 @@ def map(phen_dir, target_code_type, translate=True):
# test if there's any output from processing
if len(out.index) == 0:
raise Exception("The output after map processing has no output, check configuration file {str(config_path.resolve())} is not empty")
raise Exception(f"No output after map processing, check configuration {str(config_path.resolve())}")
# Final processing
out = out.reset_index(drop=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment