-
Notifications
You must be signed in to change notification settings - Fork 355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: You must specify the list of players. #28
Comments
i got the same problem, did u solve it? i would like to thank u a lot ,if u can help me. |
@viponedream and @lml519 New pysc2 api requires list of players. For example: Note even a single player needs to be wrapped in a list. Hopefully this helps. |
@lbianculli Thanks a lot. Your reply has hepled me alot. I am very appreciate, if u can give me hands again. |
@lbianculli it comes a new error:Please specify agent_interface_format. |
Hi @lml519 , `
` As you can see, the agent_interface_format can be found in the pysc2.lib.features file. Last I checked, going to SC2Env's docstring tells you which args are/arent needed as well. Hope this helps. |
@lbianculli thanks a lot. I have checked the SC2Env and change the code in "subproc_vec_env.py"and"train_mineral_shards".Then,the output change into : I think the main problem is that the different between pysc2-version2.0 and the version this using. It's very hard to change them into correct. Do u know how to solve this problem. Thank u very much. |
@lbianculli I've tried all 4 players in SC2Env, and they all output the same results.Just like the output I showed above. Then I tried to add the player into 2,3 and 4. It display the errors just like the warning which has been written in the file. Such as "Single player maps require exactly one Agent." So I think the reason of this problem is caused by the changement has some conflicts between Pysc2-Version 2.0 and 1.0. |
If you add this line
somewhere after the declaration of all command line flags (within the code itself), that should take care of the first error, e.g.
As for the second error. I'd imagine that is coming from adding players to the SC2Env constructor. Basically, that error is thrown because minigames only allow for one player, and you are specificying more than one, I am guessing? Try fixing the first issue with the line above, and if errors still persist and you wouldnt mind sharing your code, we can go from there. Thanks. |
Thank u very much for ur sincerely help. I change the position of "flags.FLAGS(sys.argv)" to the end of the declaration of all command line flags. Then the game can run. Before the game run correctly, the terminal display "TypeError: Agent(race=[<Race.terran: 1>], name='') has type <class 'pysc2.env.sc2_env.Agent'>, but expected oneof: (<class 'int'>,)". thank u. |
If you wouldnt mind pasting into the prompt the code that's throwing the error, as well as the trace if you can, that would be great. Just use the "insert code" format option at the top of the text box, right next to the quotation marks. |
@lbianculli
|
could you post some of your own code around where this error is being raised? Thanks. |
When i run
python train_mineral_shards.py --algorithm=a2c
it says:
ValueError: You must specify the list of players.
does anyone know what happen?
The text was updated successfully, but these errors were encountered: