From 3a08927a8b803ff271370ddca5ba5cf066e10a32 Mon Sep 17 00:00:00 2001 From: Remy Jette Date: Wed, 22 Nov 2023 12:13:02 -0500 Subject: [PATCH] Core: Provide a better error message if only weights.yaml is provided with players: 0 (#2227) --- Generate.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Generate.py b/Generate.py index 8113d8a0d7da..74244ec23102 100644 --- a/Generate.py +++ b/Generate.py @@ -127,6 +127,13 @@ def main(args=None, callback=ERmain): player_id += 1 args.multi = max(player_id - 1, args.multi) + + if args.multi == 0: + raise ValueError( + "No individual player files found and number of players is 0. " + "Provide individual player files or specify the number of players via host.yaml or --multi." + ) + logging.info(f"Generating for {args.multi} player{'s' if args.multi > 1 else ''}, " f"{seed_name} Seed {seed} with plando: {args.plando}")