Comments (8)
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.
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.
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.
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.
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.
Thanks mate. That was exactly the problem for me.
from python-sc2.
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.
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)
- AttributeError: TRAIN_ADEPT
- Headless Linux version broken on "develop" branch HOT 3
- Can not run bot_vs_bot in double screen separately. HOT 1
- Does this library support distributed training?
- KeyError: 412
- STARPORTTECHLABRESEARCH abilities not working HOT 3
- How to make SCV continue build an structure which is interrupted by enemy
- Is it possible to visualize the distance in sc2? HOT 2
- Is it possible to snapshot a game state? HOT 1
- Erro in ramp_wall.py HOT 2
- ValueError: 3794 is not a valid AbilityId causing by "realtime=True/False" HOT 2
- ModuleNotFoundError: No module named 'websockets' HOT 1
- Error while using self.time = (self.state.game_loop/22.4) / 60 HOT 2
- after fixing 3794/3795 error -botAI main_base_ramp fails
- Error on max() of empty set when assigning workers.
- cannot import name 'run_game' HOT 1
- How to Arm Silo with Nuke for ghost HOT 1
- How to ask Queen EFFECT_INJECTLARVA"v" to hatcherys each one
- error to execute.
- don't have "run_game" file in sc2 lib HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-sc2.