You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using PackageLoader and the template directory does not exist, it throws an error saying:
The 'foobar' package was not installed in a way that PackageLoader understands.
This is clearly incorrect. If the package is actually not there, we get an assertion error. I would say the error should be something like "Template directory was not found in package 'foobar'." or something along those lines.
Describe how to replicate the bug.
Just create a package without the template directory. Try to pass that name of the package to PackageLoader causes the incorrect error to be thrown.
I hope this is not considered too trivial. It did cost me some time to figure out, and only after reading the source code, so I think it's worth changing to something that makes the root cause more apparent.
Environment:
Python version: 3.10.12
Jinja version: 3.1.4
The text was updated successfully, but these errors were encountered:
When using
PackageLoader
and the template directory does not exist, it throws an error saying:This is clearly incorrect. If the package is actually not there, we get an assertion error. I would say the error should be something like "Template directory was not found in package 'foobar'." or something along those lines.
Describe how to replicate the bug.
Just create a package without the template directory. Try to pass that name of the package to PackageLoader causes the incorrect error to be thrown.
I hope this is not considered too trivial. It did cost me some time to figure out, and only after reading the source code, so I think it's worth changing to something that makes the root cause more apparent.
Environment:
The text was updated successfully, but these errors were encountered: