- Fix `copy`/`pickle` support for the internal ``missing`` object.
:issue:`2027`
- ``Environment.overlay(enable_async)`` is applied correctly. :pr:`2061`
+- Paths where the loader searched for the template were added
+ to the error message. :issue:`1661`
Version 3.1.4
if os.path.isfile(filename):
break
else:
- raise TemplateNotFound(template)
+ raise TemplateNotFound(
+ f"{template} not found in the following search path(s):"
+ f" {self.searchpath}"
+ )
with open(filename, encoding=self.encoding) as f:
contents = f.read()