From ed24682bc360df2928e030239cca737294f12af9 Mon Sep 17 00:00:00 2001 From: Martin Ueding Date: Sun, 9 Jun 2024 11:41:23 +0200 Subject: [PATCH] GH-109: Improve error message when there are no activities --- geo_activity_playground/__main__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/geo_activity_playground/__main__.py b/geo_activity_playground/__main__.py index aac2eba..db41778 100644 --- a/geo_activity_playground/__main__.py +++ b/geo_activity_playground/__main__.py @@ -122,6 +122,12 @@ def make_activity_repository( if "strava" in config and not skip_strava: import_from_strava_api(repository) + if len(repository) == 0: + logger.error( + f"No activities found. You need to either add activity files (GPX, FIT, …) to {basedir/'Activities'} or set up the Strava API. Starting without any activities is unfortunately not supported." + ) + sys.exit(1) + embellish_time_series(repository) compute_tile_visits(repository) compute_tile_evolution()