gillesdami / python-sc2-env Goto Github PK
View Code? Open in Web Editor NEWThis project forked from dentosal/python-sc2
A StarCraft II bot gym env library over python-sc2
License: MIT License
This project forked from dentosal/python-sc2
A StarCraft II bot gym env library over python-sc2
License: MIT License
I got this error, what should I do? Thank you.
DEBUG:asyncio:Using selector: SelectSelector
INFO:sc2Env.Sc2Env:waiting Sc2Bot spaces
Traceback (most recent call last):
File "SC2.py", line 36, in <module>
initializer, observer, actuator, game_time_limit=60)
File "E:\Code\MachineLearning\SC2\SC2\SC2\lib\site-packages\sc2Env\Sc2Env.py", line 30, in __init__
self.reset()
File "E:\Code\MachineLearning\SC2\SC2\SC2\lib\site-packages\sc2Env\Sc2Env.py", line 53, in reset
select([self.env_pipe], [], [], 10)
OSError: [WinError 10038] 嘗試操作的對象不是通訊端。
DEBUG:sc2Env.sc2process:kill_switch: Add switch
DEBUG:sc2Env.sc2process:Websocket connection ready
DEBUG:sc2Env.protocol:Sending request: ping {
}
DEBUG:sc2Env.protocol:Request sent
DEBUG:sc2Env.protocol:Response received
INFO:sc2Env.protocol:Client status changed to Status.launched (was None)
INFO:sc2Env.controller:Creating new game
INFO:sc2Env.controller:Map: ThunderbirdLE
INFO:sc2Env.controller:Players: Bot(Race.Zerg, <sc2Env.Sc2Bot.Sc2Bot object at 0x00000221CC28DE88>), Computer(Race.Zerg, Difficulty.Easy)
DEBUG:sc2Env.protocol:Sending request: create_game {
local_map {
map_path: "2019\\ThunderbirdLE.SC2Map"
}
player_setup {
type: Participant
}
player_setup {
type: Computer
race: Zerg
difficulty: Easy
}
realtime: false
}
DEBUG:sc2Env.protocol:Request sent
DEBUG:sc2Env.protocol:Response received
INFO:sc2Env.protocol:Client status changed to Status.init_game (was Status.launched)
DEBUG:sc2Env.protocol:Sending request: join_game {
race: Zerg
options {
raw: true
score: true
}
}
DEBUG:sc2Env.protocol:Request sent
DEBUG:sc2Env.protocol:Response received
INFO:sc2Env.protocol:Client status changed to Status.in_game (was None)
INFO:root:Player id: 1 (None)
DEBUG:sc2Env.protocol:Sending request: data {
ability_id: true
unit_type_id: true
upgrade_id: true
}
DEBUG:sc2Env.protocol:Request sent
DEBUG:sc2Env.protocol:Response received
INFO:sc2Env.sc2process:kill_switch: Process cleanup
INFO:sc2Env.sc2process:Cleaning up...
INFO:sc2Env.sc2process:Cleanup complete
Exception in thread Thread-1:
ValueError: 3794 is not a valid AbilityId
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\threading.py", line 926, in _bootstrap_inner
self.run()
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "E:\Code\MachineLearning\SC2\SC2\SC2\lib\site-packages\sc2Env\Sc2Env.py", line 43, in _run_game
run_game(self.map, players, realtime=False, **self.kwargs)
File "E:\Code\MachineLearning\SC2\SC2\SC2\lib\site-packages\sc2Env\main.py", line 308, in run_game
_host_game(map_settings, players, **kwargs)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\asyncio\base_events.py", line 579, in run_until_complete
return future.result()
File "E:\Code\MachineLearning\SC2\SC2\SC2\lib\site-packages\sc2Env\main.py", line 235, in _host_game
result = await _play_game(players[0], client, realtime, portconfig, step_time_limit, game_time_limit, rgb_render_config)
File "E:\Code\MachineLearning\SC2\SC2\SC2\lib\site-packages\sc2Env\main.py", line 206, in _play_game
result = await _play_game_ai(client, player_id, player.ai, realtime, step_time_limit, game_time_limit)
File "E:\Code\MachineLearning\SC2\SC2\SC2\lib\site-packages\sc2Env\main.py", line 91, in _play_game_ai
game_data = await client.get_game_data()
File "E:\Code\MachineLearning\SC2\SC2\SC2\lib\site-packages\sc2Env\client.py", line 143, in get_game_data
return GameData(result.data)
File "E:\Code\MachineLearning\SC2\SC2\SC2\lib\site-packages\sc2Env\game_data.py", line 29, in __init__
self.abilities = {a.ability_id: AbilityData(self, a) for a in data.abilities if a.ability_id in ids}
File "E:\Code\MachineLearning\SC2\SC2\SC2\lib\site-packages\sc2Env\game_data.py", line 29, in <dictcomp>
self.abilities = {a.ability_id: AbilityData(self, a) for a in data.abilities if a.ability_id in ids}
File "E:\Code\MachineLearning\SC2\SC2\SC2\lib\site-packages\sc2Env\game_data.py", line 93, in __init__
assert self.id != 0
File "E:\Code\MachineLearning\SC2\SC2\SC2\lib\site-packages\sc2Env\game_data.py", line 101, in id
return AbilityId(self._proto.remaps_to_ability_id)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\enum.py", line 310, in __call__
return cls.__new__(cls, value)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\enum.py", line 564, in __new__
raise exc
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\enum.py", line 548, in __new__
result = cls._missing_(value)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\enum.py", line 577, in _missing_
raise ValueError("%r is not a valid %s" % (value, cls.__name__))
ValueError: 3794 is not a valid AbilityId
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x00000221CC2C2348>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.