983 handle missing external dictionaries#1611
Conversation
RamilCDISC
left a comment
There was a problem hiding this comment.
I think it will be nice to have a unit test for such cases. Could you please add a test? If you can think of some other cases too you can add those too.
|
@RakeshBobba03 can you also provide an output report that shows the results. |
@gerrycampion I ran the same validation twice (before and after the fix) with:
For the “before” run I redirected stdout/stderr to logs_before.txt; for the “after” run I used logs_after.txt and wrote the report to output_after.json. logs_before.txt shows the run crashing with an unhandled There is no “before” report (run crashed). output_after.json is the full JSON report produced after the fix. With the fix, rules that fail at run time (including those that need the missing dictionary) are reported with EXECUTION_ERROR for that rule/dataset in the JSON (e.g. “rule evaluation error - operation failed”) instead of the whole run stopping. You can see those entries in output_after.json. |
|
@RakeshBobba03 |
I used that run as an example to show the fix: with a bad MedDRA path the engine no longer crashes, it logs a warning, and it still produces a full report. |
…DataError skip and related cases)
|
All seems okay to me. @gerrycampion could you please let us know if you are okay with the PR too? Then i will do a final validation and approve. |
This PR fixes Issue #983, where CORE would crash with an unhandled
MissingDataErrorif an external dictionary (e.g. MedDRA) could not be read. The change wraps dictionary installation infill_cache_with_dictionarieswith atry/except MissingDataError, logs a warning that the specific dictionary/path could not be loaded, skips installing that dictionary into the cache, and continues validation. As a result, validation runs complete and produce reports, while any rules that later fail due to missing dictionaries are surfaced asEXECUTION_ERRORat the rule level instead of terminating the entire process.