diff --git a/src/backend/base/langflow/services/monitor/service.py b/src/backend/base/langflow/services/monitor/service.py index f644fd87160..de19700067d 100644 --- a/src/backend/base/langflow/services/monitor/service.py +++ b/src/backend/base/langflow/services/monitor/service.py @@ -21,7 +21,7 @@ def __init__(self, settings_service: "SettingsService"): from langflow.services.monitor.schema import DuckDbMessageModel, TransactionModel, VertexBuildModel self.settings_service = settings_service - self.base_cache_dir = Path(user_cache_dir("langflow")) + self.base_cache_dir = Path(user_cache_dir("langflow"), ensure_exists=True) self.db_path = self.base_cache_dir / "monitor.duckdb" self.table_map: dict[str, type[TransactionModel | DuckDbMessageModel | VertexBuildModel]] = { "transactions": TransactionModel,