Improve the PackageLoader error message
This exception is raised when the `package_path` directory (default "templates") is not found, so explain this.
This commit is contained in:
parent
58a358f092
commit
f54fa113d3
@ -353,8 +353,8 @@ class PackageLoader(BaseLoader):
|
||||
|
||||
if template_root is None:
|
||||
raise ValueError(
|
||||
f"The {package_name!r} package was not installed in a"
|
||||
" way that PackageLoader understands."
|
||||
f"PackageLoader could not find a '{package_path}' directory for the "
|
||||
f"{package_name!r} package."
|
||||
)
|
||||
|
||||
self._template_root = template_root
|
||||
|
||||
Loading…
Reference in New Issue
Block a user