-
Notifications
You must be signed in to change notification settings - Fork 210
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Problem description
- Upgrading to FastAPI 0.108.0, allowed for a starlette upgrade to 0.32.0.post1 (previously I was on 0.27.0).
- Starlette version 0.28 includes this PR, which changes the way that
Jinja2Templates()works. - The code in
Jinja2Templates.__init__()now has anassert directory or env - titiler, though, passes in
directory=""which python evaluates to False, which triggers the assert
...
File "./main.py", line 9, in <module>
from titiler.core.errors import DEFAULT_STATUS_CODES, add_exception_handlers
File "..../lib/python3.11/site-packages/titiler/core/__init__.py", line 5, in <module>
from . import dependencies, errors, factory, routing # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ..../lib/python3.11/site-packages/titiler/core/factory.py", line 73, in <module>
DEFAULT_TEMPLATES = Jinja2Templates(
^^^^^^^^^^^^^^^^
File "..../lib/python3.11/site-packages/starlette/templating.py", line 103, in __init__
assert directory or env, "either 'directory' or 'env' arguments must be passed"
AssertionError: either 'directory' or 'env' arguments must be passed
Expected Output
No assertion error.
Environment Information
Ubuntu 22.04, python3.11
Kanahiro
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working