Skip to content

Commit 46819bd

Browse files
committed
Do not continue with inaccessible model or data path.
1 parent 83b8c49 commit 46819bd

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

docs/environment.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Environment Variables
22
---------------------
33

4-
The Scoutbot API and CLI have two environment variables (envars) that allow you to configure global settings
4+
The Scoutbot API and CLI have environment variables (envars) that allow you to configure global settings
55
and configurations.
66

77
- ``CONFIG`` (default: mvp)

scoutbot/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@
8383
# It's a path - check if it exists
8484
model_path = Path(MODEL_BASE_URL)
8585
if not model_path.exists():
86-
log.warning(f"Model source path does not exist: {MODEL_BASE_URL}")
86+
log.warning(f"Model source path does not exist or is inaccessible: {MODEL_BASE_URL}")
87+
exit()
8788

8889
# Validate DATA_BASE_URL
8990
parsed = urlparse(DATA_BASE_URL)
@@ -96,7 +97,8 @@
9697
# It's a path - check if it exists
9798
data_path = Path(DATA_BASE_URL)
9899
if not data_path.exists():
99-
log.warning(f"Data source path does not exist: {DATA_BASE_URL}")
100+
log.warning(f"Data source path does not exist or is inaccessible: {DATA_BASE_URL}")
101+
exit()
100102

101103
from scoutbot import agg, loc, tile, wic, tile_batched # NOQA
102104
from scoutbot.loc import CONFIGS as LOC_CONFIGS # NOQA

0 commit comments

Comments
 (0)