Ziktofel / Archipelago

Archipelago Multi-Game Randomizer and Server
https://archipelago.gg
Other
0 stars 6 forks source link

Minor Bug: Unhelpful exception when generating with no missions toggled on #190

Open samkester opened 2 months ago

samkester commented 2 months ago

What happened?

While test-generating some yamls with triggers, I messed up one of my trigger definitions and ended up with no missions toggled on, which resulted in this error:

Traceback (most recent call last):
  File "__startup__.py", line 124, in run
  File "console.py", line 16, in run
  File "Generate.py", line 549, in <module>
  File "Generate.py", line 240, in main
  File "Main.py", line 135, in main
  File "worlds\AutoWorld.py", line 155, in call_all
  File "worlds\AutoWorld.py", line 145, in call_single
  File "worlds\AutoWorld.py", line 138, in call_single
  File "worlds\AutoWorld.py", line 124, in _timed_call
  File "worlds\sc2\__init__.py", line 70, in create_regions
  File "worlds\sc2\Regions.py", line 34, in create_regions
  File "worlds\sc2\Regions.py", line 277, in create_grid_regions
  File "worlds\sc2\PoolFilter.py", line 72, in filter_missions
ValueError: max() arg is an empty sequence

What were the expected results?

Expected an error message that was clear about the underlying config error, along the lines of "No missions detected for Starcraft 2 player [Slotname], please fix your yaml."

Software

Local generation

Ziktofel commented 2 months ago

I have no clue, the YAMLs aren't in the report

Without an additional information I'll close that as invalid as attempt to reproduce that will be futile

MatthewMarinets commented 2 weeks ago

Managed to get a similar error on sc2-next by trying very hard. Error:

...
  File "D:\Archipelago\matthew\Archipelago\worlds\sc2\pool_filter.py", line 54, in filter_missions
    goal_level = max(goal_priorities.values())
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: max() iterable argument is empty

Steps: