Skip to content

Commit 124ce13

Browse files
authored
Core: improve error message for missing "game" entry in yaml (ArchipelagoMW#4185)
1 parent 48ea274 commit 124ce13

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Generate.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,10 @@ def roll_settings(weights: dict, plando_options: PlandoOptions = PlandoOptions.b
453453
raise Exception(f"Option {option_key} has to be in a game's section, not on its own.")
454454

455455
ret.game = get_choice("game", weights)
456+
if not isinstance(ret.game, str):
457+
if ret.game is None:
458+
raise Exception('"game" not specified')
459+
raise Exception(f"Invalid game: {ret.game}")
456460
if ret.game not in AutoWorldRegister.world_types:
457461
from worlds import failed_world_loads
458462
picks = Utils.get_fuzzy_results(ret.game, list(AutoWorldRegister.world_types) + failed_world_loads, limit=1)[0]

0 commit comments

Comments
 (0)