Skip to content

updating the verbiage of 'ModuleNotFound' error. #997

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion azure_functions_worker/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ def uninstall() -> None:

@attach_message_to_exception(
expt_type=ImportError,
message=f'Troubleshooting Guide: {MODULE_NOT_FOUND_TS_URL}'
message=f'Please check the requirements.txt file for the missing module. '
f'For more info, please refer the troubleshooting'
f' guide: {MODULE_NOT_FOUND_TS_URL} '
)
def load_function(name: str, directory: str, script_file: str,
entry_point: typing.Optional[str]):
Expand Down
4 changes: 3 additions & 1 deletion tests/unittests/test_http_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,9 @@ def check_log_import_module_troubleshooting_url(self,
host_out: typing.List[str]):
self.assertIn("Exception: ModuleNotFoundError: "
"No module named 'does_not_exist'. "
"Troubleshooting Guide: "
"Please check the requirements.txt file for the "
"missing module. For more info, please refer the "
"troubleshooting guide: "
"https://aka.ms/functions-modulenotfound", host_out)

@pytest.mark.flaky(reruns=3)
Expand Down
4 changes: 3 additions & 1 deletion tests/unittests/test_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ def test_loader_outside_main_package_should_be_loaded_from_package(self):
def check_log_loader_module_not_found(self, host_out):
self.assertIn("Exception: ModuleNotFoundError: "
"No module named 'notfound'. "
"Troubleshooting Guide: "
"Please check the requirements.txt file for the "
"missing module. For more info, please refer the "
"troubleshooting guide: "
"https://aka.ms/functions-modulenotfound", host_out)


Expand Down