Closed merfolk closed 4 years ago
This change will crash bots, as PathingManager relies on the reset() method that for some reason is missing in sc2pathlib v0.3.
py run_custom.py -p1 12pool -p2 zealot
ERROR:sc2.main:AI step threw an error
Traceback (most recent call last):
File "python-sc2\sc2\main.py", line 174, in _play_game_ai
await ai.on_step(iteration)
File "C:\Dev\sc2\sharpy-sc2\sharpy\knowledges\knowledge_bot.py", line 122, in on_step
await self.knowledge.update(iteration)
File "C:\Dev\sc2\sharpy-sc2\sharpy\knowledges\knowledge.py", line 259, in update
await manager.update()
File "C:\Dev\sc2\sharpy-sc2\sharpy\managers\pathing_manager.py", line 63, in update
await self.update_influence()
File "C:\Dev\sc2\sharpy-sc2\sharpy\managers\pathing_manager.py", line 118, in update_influence
self.path_finder_terrain.reset() # Reset
AttributeError: 'PathFinder' object has no attribute 'reset'
Seems like the released version v0.3 of sc2-pathlib is in fact older than the one used by sharpy-sc2, since reset() method does exist in the repo's master branch.
https://github.com/DrInfy/sc2-pathlib/blob/master/sc2pathlibp/path_finder.py#L52
A new release of sc2-pathlib needs to be made, before this is of any use. For now sharpy-sc2 contains some version of sc2-pathlib.