Unverified Commit 48305755 authored by Dhruv Nair's avatar Dhruv Nair Committed by GitHub
Browse files

Raise warning instead of error when imports are missing for custom code (#12513)

update
parent 7853bfbe
...@@ -151,8 +151,8 @@ def check_imports(filename): ...@@ -151,8 +151,8 @@ def check_imports(filename):
missing_packages.append(imp) missing_packages.append(imp)
if len(missing_packages) > 0: if len(missing_packages) > 0:
raise ImportError( logger.warning(
"This modeling file requires the following packages that were not found in your environment: " "This modeling file might require the following packages that were not found in your environment: "
f"{', '.join(missing_packages)}. Run `pip install {' '.join(missing_packages)}`" f"{', '.join(missing_packages)}. Run `pip install {' '.join(missing_packages)}`"
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment