From 43b3e99f53c45d17622cbb434f2e66a315516cf7 Mon Sep 17 00:00:00 2001 From: Wenyu Date: Thu, 6 May 2021 15:13:57 +0800 Subject: [PATCH] fix error imformation when trigger import error (#32702) --- python/paddle/hapi/hub.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/hapi/hub.py b/python/paddle/hapi/hub.py index 6490c878f9b..54765c1d4d4 100644 --- a/python/paddle/hapi/hub.py +++ b/python/paddle/hapi/hub.py @@ -43,8 +43,8 @@ def _import_module(name, repo_dir): except ImportError: sys.path.remove(repo_dir) raise RuntimeError( - 'Cannot import `{}`, please make sure `{}`.py in repo root dir'. - format(name, name)) + 'Please make sure config exists or repo error messages above fixed when importing' + ) sys.path.remove(repo_dir) -- GitLab