question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Game doesn't run

See original GitHub issue

Hello,

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:closed
  • Created 5 years ago
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mjschuetze102commented, Jul 3, 2018

Maybe try #52. Redownload the maps and extract them again

1reaction
indusninjacommented, Jul 3, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Games do not run after 'Preparing to Launch' - Steam Support
If a game won't launch, this is often caused by corruption in your ... Games may not launch if you're running software which...
Read more >
What To Do When Your Game Won't Start: Troubleshooting ...
Restart Steam/Epic Games Store/Uplay/Origin · Restart your PC or Console · Verify your game cache · Clean the disk · Check the online...
Read more >
What if new games don't start or are not working on Windows ...
1. Restart your gaming platform. 2. Restart your PC. 3. Check whether your system meets the game’s requirements.
Read more >
What to do when a game won't run - PC Gamer
What to do when a game won't run · 1. Make sure your PC meets the minimum specs · 2. Restart your PC...
Read more >
How to Fix: Steam Game won't Launch - TechLoris
Open the Steam shortcut in the Steam game folder located in “C Program Files x86” and try relaunching the game to check if...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found