Blizzard / Blizzard/s2client-proto
KeyError: 4132
- Dominant language
- Python
- Stars
- 4k
- Forks
- 440
- PR merge metrics
- No merged PRs in 30d
Description
File "D:\anaconda\envs\textcraft\lib\site-packages\sc2\bot_ai_internal.py", line 277, in _abilities_count_and_build_progress
for order in unit.orders:
File "D:\anaconda\envs\textcraft\lib\functools.py", line 981, in __get__
val = self.func(instance)
File "D:\anaconda\envs\textcraft\lib\site-packages\sc2\unit.py", line 1029, in orders
return [UnitOrder.from_proto(order, self._bot_object) for order in self._proto.orders]
File "D:\anaconda\envs\textcraft\lib\site-packages\sc2\unit.py", line 1029, in
return [UnitOrder.from_proto(order, self._bot_object) for order in self._proto.orders]
File "D:\anaconda\envs\textcraft\lib\site-packages\sc2\unit.py", line 96, in from_proto
ability=bot_object.game_data.abilities[proto.ability_id],
KeyError: 4132
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the traceback in bot_ai_internal.py at _abilities_count_and_build_progress and follow UnitOrder.from_proto in unit.py, especially the lookup of ability ID 4132. Check the protocol definitions and game-data mapping for that ID, then reproduce the reported orders path and verify it no longer raises KeyError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100