Skip to content

Commit 7f8f2ff

Browse files
authored
Added exception info when cannot import tasks module (#76)
1 parent 731eb46 commit 7f8f2ff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

taskiq/cli/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ def import_from_modules(modules: List[str]) -> None:
6262
logger.info(f"Importing tasks from module {module}")
6363
with add_cwd_in_path():
6464
import_module(module)
65-
except ImportError:
66-
logger.warning(f"Cannot import {module}")
65+
except ImportError as err:
66+
logger.warning(f"Cannot import {module}. Cause:")
67+
logger.exception(err)
6768

6869

6970
def import_tasks(modules: List[str], pattern: str, fs_discover: bool) -> None:

0 commit comments

Comments
 (0)