pysc2-tutorial icon indicating copy to clipboard operation
pysc2-tutorial copied to clipboard

'NamedDict' object has no attribute 'feature_units'

Open ai2010 opened this issue 7 years ago • 2 comments

I'm trying to run the final zerg bot (zerg_agent_step7.py) through the command:

python3 -m pysc2.bin.agent --map Simple64 --agent zergbot.ZergAgent

and I got the error:

zerglings = self.get_units_by_type(obs, units.Zerg.Zergling) File "/Users/xx/Desktop/xx/xx/pysc2-tutorial/zergbot.py", line 25, in get_units_by_type return [unit for unit in obs.observation.feature_units AttributeError: 'NamedDict' object has no attribute 'feature_units'

ai2010 avatar Jul 05 '18 15:07 ai2010

Just add --use_feature_units parameter to the command.

dkorduban avatar Aug 17 '18 09:08 dkorduban

I'm trying to run the final zerg bot (zerg_agent_step7.py) through the command:

python3 -m pysc2.bin.agent --map Simple64 --agent zergbot.ZergAgent

and I got the error:

zerglings = self.get_units_by_type(obs, units.Zerg.Zergling) File "/Users/xx/Desktop/xx/xx/pysc2-tutorial/zergbot.py", line 25, in get_units_by_type return [unit for unit in obs.observation.feature_units AttributeError: 'NamedDict' object has no attribute 'feature_units'

are you fixed it bro? i also stucked in there

wartenhx avatar Jun 21 '19 01:06 wartenhx