RuntimeError: map_path file doesn't exist
See original GitHub issueTrying to run the simplest bot for testing after installation, results in this:
import sc2
from sc2 import run_game, maps, Race, Difficulty
from sc2.player import Bot, Computer
class WorkerRushBot(sc2.BotAI):
async def on_step(self, iteration):
if iteration == 0:
for worker in self.workers:
await self.do(worker.attack(self.enemy_start_locations[0]))
run_game(maps.get("Abyssal Reef LE"), [
Bot(Race.Zerg, WorkerRushBot()),
Computer(Race.Protoss, Difficulty.Medium)
], realtime=True)
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.Zerg, <main.WorkerRushBot object at 0x7f92164b7208>), Computer(Race.Protoss, Difficulty.Medium) CRITICAL:sc2.main:Could not create game: CreateGameError.InvalidMapPath: map_path file doesn’t exist. INFO:sc2.sc2process:kill_switch: Process cleanup INFO:sc2.sc2process:Cleaning up… INFO:sc2.sc2process:Cleanup complete INFO:sc2.sc2process:Cleaning up… INFO:sc2.sc2process:Cleanup complete INFO:sc2.sc2process:Cleaning up… INFO:sc2.sc2process:Cleanup complete INFO:sc2.sc2process:Cleaning up… INFO:sc2.sc2process:Cleanup complete INFO:sc2.sc2process:Cleaning up… INFO:sc2.sc2process:Cleanup complete INFO:sc2.sc2process:Cleaning up… INFO:sc2.sc2process:Cleanup complete INFO:sc2.sc2process:Cleaning up… INFO:sc2.sc2process:Cleanup complete INFO:sc2.sc2process:Cleaning up… INFO:sc2.sc2process:Cleanup complete INFO:sc2.sc2process:Cleaning up… INFO:sc2.sc2process:Cleanup complete INFO:sc2.sc2process:Cleaning up… INFO:sc2.sc2process:Cleanup complete INFO:sc2.sc2process:Cleaning up… INFO:sc2.sc2process:Cleanup complete INFO:sc2.sc2process:Cleaning up… INFO:sc2.sc2process:Cleanup complete INFO:sc2.sc2process:Cleaning up… INFO:sc2.sc2process:Cleanup complete
RuntimeError Traceback (most recent call last) <ipython-input-26-1e52d3a263e6> in <module>() 12 Bot(Race.Zerg, WorkerRushBot()), 13 Computer(Race.Protoss, Difficulty.Medium) —> 14 ], realtime=True)
~/.local/lib/python3.6/site-packages/sc2/main.py in run_game(map_settings, players, **kwargs) 185 result = asyncio.get_event_loop().run_until_complete( 186 _host_game(map_settings, players, **kwargs) –> 187 ) 188 return result
~/anaconda3/lib/python3.6/asyncio/base_events.py in run_until_complete(self, future) 465 raise RuntimeError(‘Event loop stopped before Future completed.’) 466 –> 467 return future.result() 468 469 def stop(self):
~/.local/lib/python3.6/site-packages/sc2/main.py in _host_game(map_settings, players, realtime, portconfig, save_replay_as, step_time_limit, game_time_limit) 110 await server.ping() 111 client = await _setup_host_game(server, map_settings, players, realtime) –> 112 113 try: 114 result = await _play_game(players[0], client, realtime, portconfig, step_time_limit, game_time_limit)
~/.local/lib/python3.6/site-packages/sc2/main.py in _setup_host_game(server, map_settings, players, realtime) 97 err += f": {r.create_game.error_details}" 98 logger.critical(err) —> 99 raise RuntimeError(err) 100 101 return Client(server._ws)
RuntimeError: Could not create game: CreateGameError.InvalidMapPath: map_path file doesn’t exist.
System: Ubuntu 18.04
Downloaded SC2 3.17 linux package from its source: https://github.com/Blizzard/s2client-proto#downloads
Extracted it into /home as is suggested.
Downloaded all 2017-2018 Map Packs and extracted them in Maps inside StarCraft2 folder, in each respective folder.
Any idea whats the issue?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top GitHub Comments
I realized that I downloaded the linux package version 3.17, while there is a 4.1.2 version.
https://github.com/Blizzard/s2client-proto#downloads
I downloaded that, copied the maps inside
Maps
, and a new similar exception was raised, but now with a new detail:'/home/jack/StarCraftII/maps/Ladder2017Season1/AbyssalReefLE.SC2Map' file doesn't exist.
, wheremaps
folder is with lowercase M.So I duplicate the
Maps
folder to a newmaps
folder in the same directory, and the bot started to work 😃Final directory structure
@varunbalupuri check if that works for you.
I had the same issue with my docker image. I had to use lower case
maps
for some reason to fix my problem. https://hub.docker.com/r/burnysc2/python-sc2-docker/~/dockerfile/