Dentosal / python-sc2

A StarCraft II bot api client library for Python 3
MIT License
586 stars 182 forks source link

AttributeError: TRAIN_ADEPT #285

Open itwasonlyabug opened 5 years ago

itwasonlyabug commented 5 years ago

Hi, after the update, I started getting a lot of errors, but I took care of most of them by following the instructions here: https://github.com/Dentosal/python-sc2/issues/283#issuecomment-495991889 and here: https://github.com/Dentosal/python-sc2/issues/266#issuecomment-487226425

Now however, I am getting this error:

sc2/data.py", line 61, in <module>
    AbilityId.TRAIN_ADEPT: AbilityId.TRAINWARP_ADEPT,
  File "/usr/lib/python3.7/enum.py", line 349, in __getattr__
    raise AttributeError(name) from None
AttributeError: TRAIN_ADEPT

Which is referring to the last line here:

warpgate_abilities: Dict[AbilityId, AbilityId] = {
    AbilityId.GATEWAYTRAIN_ZEALOT: AbilityId.WARPGATETRAIN_ZEALOT,
    AbilityId.GATEWAYTRAIN_STALKER: AbilityId.WARPGATETRAIN_STALKER,
    AbilityId.GATEWAYTRAIN_HIGHTEMPLAR: AbilityId.WARPGATETRAIN_HIGHTEMPLAR,
    AbilityId.GATEWAYTRAIN_DARKTEMPLAR: AbilityId.WARPGATETRAIN_DARKTEMPLAR,
    AbilityId.GATEWAYTRAIN_SENTRY: AbilityId.WARPGATETRAIN_SENTRY,
    AbilityId.TRAIN_ADEPT: AbilityId.TRAINWARP_ADEPT,

However removing this line results in this error:

Traceback (most recent call last):
  File ".../GIT/sc2AI.py", line 1, in <module>
    import sc2
  File ".../sc2/__init__.py", line 19, in <module>
    from .bot_ai import BotAI
  File ".../sc2/bot_ai.py", line 11, in <module>
    from .game_data import AbilityData, GameData
  File ".../sc2/game_data.py", line 5, in <module>
    from .constants import ZERGLING
  File "/.../site-packages/sc2/constants.py", line 3, in <module>
    from .ids.effect_id import *
  File "/.../sc2/ids/effect_id.py", line 8
    for item in EffectId:
      ^

Any ideas?