GithubHelp home page GithubHelp logo

Comments (8)

PaulGithell avatar PaulGithell commented on June 15, 2024

I Have exactly the same problem. I run the script, starcraft tries to start up for 2s, but crashes every time with every script ive tried.
I tired with spyder(anaconda py.3.6) and just plain py3.6. Neither of them worked.

from python-sc2.

Prometheus3D avatar Prometheus3D commented on June 15, 2024

I too am getting the same issue:

"C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\python.exe" "D:/AI Project/StarCraft2_bot/scBot.py"
INFO:sc2.protocol:Client status changed to Status.launched (was None)
INFO:sc2.controller:Creating new game
INFO:sc2.controller:Map: CactusValleyLE
INFO:sc2.controller:Players: Bot(Race.Terran, <main.SC2Bot object at 0x0000020D5D161EB8>), 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...
Traceback (most recent call last):
INFO:sc2.sc2process:Cleanup complete
File "D:/AI Project/StarCraft2_bot/scBot.py", line 16, in
], realtime=True)
File "D:\AI Project\StarCraft2_bot\python-sc2\sc2\main.py", line 187, in run_game
_host_game(map_settings, players, **kwargs)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\asyncio\base_events.py", line 467, in run_until_complete
return future.result()
File "D:\AI Project\StarCraft2_bot\python-sc2\sc2\main.py", line 115, in _host_game
result = await _play_game(players[0], client, realtime, portconfig, step_time_limit, game_time_limit)
File "D:\AI Project\StarCraft2_bot\python-sc2\sc2\main.py", line 87, in _play_game
result = await _play_game_ai(client, player_id, player.ai, realtime, step_time_limit, game_time_limit)
File "D:\AI Project\StarCraft2_bot\python-sc2\sc2\main.py", line 29, in _play_game_ai
game_data = await client.get_game_data()
File "D:\AI Project\StarCraft2_bot\python-sc2\sc2\client.py", line 110, in get_game_data
upgrade_id=True
File "D:\AI Project\StarCraft2_bot\python-sc2\sc2\protocol.py", line 56, in _execute
raise ProtocolError(f"{response.error}")
sc2.protocol.ProtocolError: ['A game has not been started yet']

from python-sc2.

BurnySc2 avatar BurnySc2 commented on June 15, 2024

It might be a stupid guess and bad suggestion, but you both have Python installed at locations with spaces in their folder names. A friend of mine had that too, I suggested him to reinstall to some simple folder path, e.g.

C:\Python36\

and it suddenly worked for him. He also got a long error about OSError: [Errno 10013] Connect call failed.
For him, it might have been either the spaces in the folder name or he installed it somewhere where he didn't have admin rights.

from python-sc2.

XanthanGum avatar XanthanGum commented on June 15, 2024

Thanks for the advice. Reinstalled python and tried again but still returns the same error.

PS C:\Users\Matt\Google Drive\Python\Starcraft 2> python QuilBot.py
INFO:sc2.protocol:Client status changed to Status.launched (was None)
INFO:sc2.controller:Creating new game

INFO:sc2.controller:Map: FrostLE
INFO:sc2.controller:Players: Bot(Race.Zerg, <main.WorkerRushBot object at 0x044FBFB0>), Computer(Race.Protoss, Difficulty
.Medium)
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 "QuilBot.py", line 16, in
], realtime=True)
File "C:\Users\Matt\AppData\Roaming\Python\Python36\site-packages\sc2\main.py", line 187, in run_game
_host_game(map_settings, players, **kwargs)
File "C:\python36\lib\asyncio\base_events.py", line 468, in run_until_complete
return future.result()
File "C:\Users\Matt\AppData\Roaming\Python\Python36\site-packages\sc2\main.py", line 115, in _host_game
result = await _play_game(players[0], client, realtime, portconfig, step_time_limit, game_time_limit)
File "C:\Users\Matt\AppData\Roaming\Python\Python36\site-packages\sc2\main.py", line 87, in _play_game
result = await _play_game_ai(client, player_id, player.ai, realtime, step_time_limit, game_time_limit)
File "C:\Users\Matt\AppData\Roaming\Python\Python36\site-packages\sc2\main.py", line 29, in _play_game_ai
game_data = await client.get_game_data()
File "C:\Users\Matt\AppData\Roaming\Python\Python36\site-packages\sc2\client.py", line 110, in get_game_data
upgrade_id=True
File "C:\Users\Matt\AppData\Roaming\Python\Python36\site-packages\sc2\protocol.py", line 56, in _execute
raise ProtocolError(f"{response.error}")
sc2.protocol.ProtocolError: ['A game has not been started yet']

from python-sc2.

bnvl avatar bnvl commented on June 15, 2024

Had the exact same problem, so my solution may help you as well.

The issue that caused this error for me was that the map the bot was trying to load was in fact corrupted, which led to the game instance crashing at startup.

If you had downloaded the map packs from the official API, you have to make sure they were properly extracted - the zip files are password protected. You can find the password under the Downloads section on this page - Blizzard/s2client-proto.

Hope this helps.

from python-sc2.

XanthanGum avatar XanthanGum commented on June 15, 2024

Thanks mate. That was exactly the problem for me.

from python-sc2.

mydhui avatar mydhui commented on June 15, 2024

Thanks for bnvl's comment, I solve this problem by correctly typing password while extracting those map zip files (If you don't type password, it'll just let you extract map files, but it mean you didn't accept the protocol). Don't forget the protocol. - Blizzard/s2client-proto

from python-sc2.

JulianGmp avatar JulianGmp commented on June 15, 2024

I don't have anything productive to say but HOW ON EARTH DOES THE MAP JUST CORRUPT.

WE SPENT AN ENTIRE WEEK TRYING TO FIX THIS.

AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH

from python-sc2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.