Game doesn't run
See original GitHub issueHello,
I tried this tutorial : https://www.youtube.com/watch?v=v3LJ6VvpfgI&lc=z23dvvr5jvbiyzvtoacdp43boy35vhpmr4lyn3lug2lw03c010c.1530380446748170
The code :
import sc2
from sc2 import run_game, maps, Race, Difficulty
from sc2.player import Bot, Computer
class SentdeBot(sc2.BotAI):
async def on_step(self, iteration):
# what to do every step
await self.distribute_workers() # in sc2/bot_ai.py
run_game(maps.get("AbyssalReefLE"), [
Bot(Race.Protoss, SentdeBot()),
Computer(Race.Terran, Difficulty.Easy)
], realtime=True)
However, when I run the code, i have this message in shell :
=== ERROR MESSAGE ===
INFO:sc2.protocol:Client status changed to Status.launched (was None) INFO:sc2.controller:Creating new game INFO:sc2.controller:Map: AbyssalReefLE INFO:sc2.controller:Players: Bot(Race.Protoss, <__main__.SentdeBot object at 0x0 3919070>), Computer(Race.Terran, Difficulty.Easy) INFO:sc2.protocol:Client status changed to Status.init_game (was Status.launched ) INFO:sc2.protocol:Client status changed to Status.launched (was None) INFO:root:Player id: 0 INFO:sc2.sc2process:kill_switch: Process cleanup INFO:sc2.sc2process:Cleaning up... INFO:sc2.sc2process:Cleanup complete Traceback (most recent call last): File "E:\Documents\Programmes\Windows\Programmes_Python\IA_Sc2\hataoylachance. py", line 33, in <module> ], realtime=False) File "C:\Users\Anthony\AppData\Local\Programs\Python\Python36-32\lib\site-pack ages\sc2\main.py", line 187, in run_game _host_game(map_settings, players, **kwargs) File "C:\Users\Anthony\AppData\Local\Programs\Python\Python36-32\lib\asyncio\b ase_events.py", line 468, in run_until_complete return future.result() File "C:\Users\Anthony\AppData\Local\Programs\Python\Python36-32\lib\site-pack ages\sc2\main.py", line 115, in _host_game result = await _play_game(players[0], client, realtime, portconfig, step_tim e_limit, game_time_limit) File "C:\Users\Anthony\AppData\Local\Programs\Python\Python36-32\lib\site-pack ages\sc2\main.py", line 87, in _play_game result = await _play_game_ai(client, player_id, player.ai, realtime, step_ti me_limit, game_time_limit) File "C:\Users\Anthony\AppData\Local\Programs\Python\Python36-32\lib\site-pack ages\sc2\main.py", line 29, in _play_game_ai game_data = await client.get_game_data() File "C:\Users\Anthony\AppData\Local\Programs\Python\Python36-32\lib\site-pack ages\sc2\client.py", line 110, in get_game_data upgrade_id=True File "C:\Users\Anthony\AppData\Local\Programs\Python\Python36-32\lib\site-pack ages\sc2\protocol.py", line 56, in _execute raise ProtocolError(f"{response.error}") sc2.protocol.ProtocolError: ['A game has not been started yet']
=== SYSTEM === Windows 7 64 bits Python 3.6.5 python-sc2 installed with pip Version of python-sc2 : 0.8.4 (I think, I have the file sc2-0.8.4.dist-info in site-packages on python)
Have you an idea ?
Thank you !
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (5 by maintainers)
Top GitHub Comments
Maybe try #52. Redownload the maps and extract them again
I had this error too. I was using Python 3.7.
I’ve now downgraded to 3.6 and it seems to launch SC2 now.