From 1fd15d59fc5510e413e2baf75b720020ac8d4e2f Mon Sep 17 00:00:00 2001 From: Heidar <74025356+Heidar-An@users.noreply.github.com> Date: Thu, 14 May 2026 17:03:51 +0100 Subject: [PATCH] create directory on startup (#2089) ## Motivation When you first run `uv run exo` you get an error like : `FileNotFoundError: [Errno 2] No such file or directory: '/Users/heidar/.exo/models'` Manually tested on Macbook Pro M1 32GB Fixes issue - https://github.com/exo-explore/exo/issues/2090 --- src/exo/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/exo/main.py b/src/exo/main.py index 7419e6883..8e3220ebd 100644 --- a/src/exo/main.py +++ b/src/exo/main.py @@ -18,7 +18,7 @@ from exo.download.impl_shard_downloader import exo_shard_downloader from exo.master.main import Master from exo.routing.event_router import EventRouter from exo.routing.router import Router, get_node_id_keypair -from exo.shared.constants import EXO_LOG +from exo.shared.constants import EXO_DEFAULT_MODELS_DIR, EXO_LOG from exo.shared.election import Election, ElectionResult from exo.shared.logging import logger_cleanup, logger_setup from exo.shared.types.common import NodeId, SessionId @@ -71,6 +71,9 @@ class Node: logger.info(f"Starting node {node_id}") + # Errors the very first time exo is run as dir doesn't exist + EXO_DEFAULT_MODELS_DIR.mkdir(parents=True, exist_ok=True) + # Create DownloadCoordinator (unless --no-downloads) if not args.no_downloads: download_coordinator = DownloadCoordinator(