DrInfy / sharpy-sc2

Python framework for rapid development of Starcraft 2 AI bots
MIT License
69 stars 28 forks source link

Cyclone bot crashes #35

Closed merfolk closed 4 years ago

merfolk commented 4 years ago

Describe the bug Cyclone bot crashes when I try to run it.

To Reproduce

  1. Run py run_custom.py -p1 cyclone
  2. Observe crash
ERROR:sc2.main:AI on_start threw an error
Traceback (most recent call last):
  File "python-sc2\sc2\main.py", line 115, in _play_game_ai
    await ai.on_start()
  File "C:\Dev\sc2\sharpy-sc2\sharpy\knowledges\knowledge_bot.py", line 97, in on_start
    await self.real_init()
  File "C:\Dev\sc2\sharpy-sc2\sharpy\knowledges\knowledge_bot.py", line 35, in real_init
    self.plan = await self.create_plan()
  File "C:\Dev\sc2\sharpy-sc2\dummies\terran\cyclones.py", line 58, in create_plan
    ActTech(UpgradeId.TERRANVEHICLEANDSHIPARMORSLEVEL1),
  File "C:\Dev\sc2\sharpy-sc2\sharpy\plans\acts\act_tech.py", line 34, in __init__
    from_building = UPGRADE_RESEARCHED_FROM[self.upgrade_type]
KeyError: UpgradeId.TERRANVEHICLEANDSHIPARMORSLEVEL1

Expected behavior A game should run.

Version

> git last
commit 88e9287bd63caae6fc342f0eb0278d1d55355919 (HEAD -> develop, origin/develop)
merfolk commented 4 years ago

This is caused by PR #13

DrInfy commented 4 years ago

Fixed in PR #44