Closed MislavJuric closed 3 years ago
I fixed the error by having the code I use for testing the environment in the same file as my environment class (in a function called main
) and by calling
app.run(main)
if the file is run. You can see the code that fixed the issue here.
cc
cc
I am writing a wrapper around PySC2 for TF-Agents.
I have encountered the following error while trying to construct a PySC2 environment via its constructor:
absl.flags._exceptions.UnparsedFlagAccessError: Trying to access flag --sc2_run_config before flags were parsed
Here is the code that I am using to test the environment:
And here is my PySC2 environment wrapper code:
As you can see, I tried the variant with and without the flags (I commented out the flags in my most recent attempt). I still get the error.
Here is the full error log:
What is going on here? How can I solve this?