diff --git a/imagedephi/gui.py b/imagedephi/gui.py index 28154cf6..92eae797 100644 --- a/imagedephi/gui.py +++ b/imagedephi/gui.py @@ -63,7 +63,7 @@ async def lifespan(app: FastAPI) -> AsyncGenerator[None, None]: templates = Jinja2Templates( # Jinja2Templates requires a "directory" argument, but it is effectively unused # if a custom loader is passed - directory="", + directory=".", loader=FunctionLoader(_load_template), ) diff --git a/imagedephi/utils/logger.py b/imagedephi/utils/logger.py index cbc709ff..11fd27e3 100644 --- a/imagedephi/utils/logger.py +++ b/imagedephi/utils/logger.py @@ -9,7 +9,7 @@ if os.path.exists("logging.conf") else str(importlib.resources.files("imagedephi") / "logging.conf") ) -except KeyError: +except (FileNotFoundError, KeyError): pass logger = logging.getLogger("root")