UnparsedFlagAccessError
fanbinbu opened this issue · 1 comments
Got the following error by following everything in the tutorial.
Could you please help out?
Thanks
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 /Users/fanbinbu/Study/A-Guide-to-DeepMinds-StarCraft-AI-Environment/train_mineral_shards.py
Traceback (most recent call last):
File "/Users/fanbinbu/Study/A-Guide-to-DeepMinds-StarCraft-AI-Environment/train_mineral_shards.py", line 51, in
main()
File "/Users/fanbinbu/Study/A-Guide-to-DeepMinds-StarCraft-AI-Environment/train_mineral_shards.py", line 24, in main
visualize=True) as env:
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pysc2/env/sc2_env.py", line 132, in init
self._setup((agent_race, bot_race, difficulty), **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pysc2/env/sc2_env.py", line 173, in _setup
self._run_config = run_configs.get()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pysc2/run_configs/init.py", line 38, in get
if FLAGS.sc2_run_config is None: # Find the highest priority as default.
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/absl/flags/_flagvalues.py", line 509, in getattr
raise _exceptions.UnparsedFlagAccessError(error_message)
absl.flags._exceptions.UnparsedFlagAccessError: Trying to access flag --sc2_run_config before flags were parsed.
pysc2 has switched from python-gflags to absl.flags in google-deepmind/pysc2@f2f96c0
Changing import gflags as flags
to from absl import flags
should work.