It seems that self._game_data.units doesn't provide any data for constants.LURKER(id of 911) or constants.LURKERDEN(id of 901)
I found this bug while attempting to run can_afford on LURKER and LURKERDEN
>>> self.can_afford(constants.LURKERDEN)
Traceback (most recent call last):
File "/Users/username/.pyenv/versions/3.6.5/lib/python3.6/site-packages/sc2/bot_ai.py", line 262, in can_afford
unit = self._game_data.units[item_id.value]
KeyError: 901
It seems that this bug is also keeping me from building Lurkers and Lurker Dens
Traceback (most recent call last):
File "/Users/jthomas/.pyenv/versions/3.6.5/lib/python3.6/site-packages/sc2/main.py", line 63, in _play_game_ai
await ai.on_step(iteration)
File "/Users/jthomas/git/lambdanaut-sc2/lambdanaut/bot.py", line 1316, in on_step
await self.build_manager.run()
File "/Users/jthomas/git/lambdanaut-sc2/lambdanaut/bot.py", line 613, in run
await self.create_build_target(current_build_target)
File "/Users/jthomas/git/lambdanaut-sc2/lambdanaut/bot.py", line 485, in create_build_target
self.bot.actions.append(hydralisk_dens.random.build(build_target))
File "/Users/jthomas/.pyenv/versions/3.6.5/lib/python3.6/site-packages/sc2/unit.py", line 500, in build
return self(self._game_data.units[unit.value].creation_ability.id, *args, **kwargs)
KeyError: 901
It seems that
self._game_data.units
doesn't provide any data forconstants.LURKER
(id of 911) orconstants.LURKERDEN
(id of 901)I found this bug while attempting to run
can_afford
onLURKER
andLURKERDEN
It seems that this bug is also keeping me from building Lurkers and Lurker Dens