From 31cab95b1d0535e2bcb68a2572195120b06a899d Mon Sep 17 00:00:00 2001 From: YouJiacheng <1503679330@qq.com> Date: Sun, 14 Aug 2022 21:19:14 +0800 Subject: [PATCH] Fix formatting for exception raised in C Fix #2342 --- hydra/_internal/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hydra/_internal/utils.py b/hydra/_internal/utils.py index c7230d246c..904ebd96a9 100644 --- a/hydra/_internal/utils.py +++ b/hydra/_internal/utils.py @@ -255,8 +255,7 @@ def run_and_report(func: Any) -> Any: while end is not None: frame = end.tb_frame mdl = inspect.getmodule(frame) - assert mdl is not None - name = mdl.__name__ + name = mdl.__name__ if mdl is not None else '' if name.startswith("omegaconf."): break end = end.tb_next