You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to expand, the function bot_ai.expand_now calls get_next_expansion which can return a null (will happen late in the game when no expansions are available), however, bot_ai.expand_now does not handle the null returned value.
There should be a check to see if there are any available expansion sites, and if there are not any available, then the null returned value (from get_next_expansion) should have handled without throwing an unexpected exception
The text was updated successfully, but these errors were encountered:
Similar thing happened to me.
File "C:\Users\s\sc2\bot_ai.py", line 139, in expand_now
await self.build(building, near=location, max_distance=max_distance, random_alternative=False, placement_step=1)
File "C:\Users\s\sc2\bot_ai.py", line 408, in build
p = await self.find_placement(building, near.rounded, max_distance, random_alternative, placement_step)
AttributeError: 'NoneType' object has no attribute 'rounded'
I have also picked up an issue that might be related. On King's Cove LE, the "possible_points" generator in the BotAI.expansion_locations function is empty on one of the resources in resource_groups and the min function fails with "ValueError: min() arg is an empty sequence".
When trying to expand, the function bot_ai.expand_now calls get_next_expansion which can return a null (will happen late in the game when no expansions are available), however, bot_ai.expand_now does not handle the null returned value.
There should be a check to see if there are any available expansion sites, and if there are not any available, then the null returned value (from get_next_expansion) should have handled without throwing an unexpected exception
The text was updated successfully, but these errors were encountered: