pymarl icon indicating copy to clipboard operation
pymarl copied to clipboard

absl SC2 isn't running, so bailing early on the websocket connection.

Open lcassano opened this issue 4 years ago • 3 comments

Hi, I can run "src/main.py --config=qmix --env-config=sc2 with env_args.map_name=2s3z" in the terminal ok. However, when I try to run the same function on pycharm I get the error I show below, any idea on what could be causing this and how to fix it?

Thanks in advance for any help :)

[INFO 11:48:25] my_main Beginning training for 2050000 timesteps [INFO 11:48:25] absl Launching SC2: /Applications/StarCraft II/Versions/Base82457/SC2.app/Contents/MacOS/SC2 -listen 127.0.0.1 -port 22434 -dataDir /Applications/StarCraft II/ -tempDir /var/folders/vy/0tj1lc296lnfn5twwx3gxdj40000gq/T/sc-btqhfm1c/ -displayMode 0 -windowwidth 1920 -windowheight 1200 -windowx 50 -windowy 50 [INFO 11:48:25] absl Connecting to: ws://127.0.0.1:22434/sc2api, attempt: 0, running: True [INFO 11:48:26] absl Connecting to: ws://127.0.0.1:22434/sc2api, attempt: 1, running: True [INFO 11:48:27] absl Connecting to: ws://127.0.0.1:22434/sc2api, attempt: 2, running: True [INFO 11:48:28] absl Connecting to: ws://127.0.0.1:22434/sc2api, attempt: 3, running: True [INFO 11:48:29] absl Connecting to: ws://127.0.0.1:22434/sc2api, attempt: 4, running: True [INFO 11:48:30] absl Connecting to: ws://127.0.0.1:22434/sc2api, attempt: 5, running: True [INFO 11:48:31] absl Connecting to: ws://127.0.0.1:22434/sc2api, attempt: 6, running: True [INFO 11:48:32] absl Connecting to: ws://127.0.0.1:22434/sc2api, attempt: 7, running: True [INFO 11:48:33] absl Connecting to: ws://127.0.0.1:22434/sc2api, attempt: 8, running: True [INFO 11:48:34] absl Connecting to: ws://127.0.0.1:22434/sc2api, attempt: 9, running: True [INFO 11:48:35] absl Connecting to: ws://127.0.0.1:22434/sc2api, attempt: 10, running: True [INFO 11:48:36] absl Connecting to: ws://127.0.0.1:22434/sc2api, attempt: 11, running: True [WARNING 11:48:38] absl SC2 isn't running, so bailing early on the websocket connection. [INFO 11:48:38] absl Shutdown gracefully. [INFO 11:48:38] absl Shutdown with return code: 1 [DEBUG 11:48:39] pymarl Stopping Heartbeat [ERROR 11:48:39] pymarl Failed after 0:00:14! Traceback (most recent calls WITHOUT Sacred internals): File "/Users/lucas/Documents/pymarl-master/src/main.py", line 35, in my_main run(_run, config, _log) File "/Users/lucas/Documents/pymarl-master/src/run.py", line 48, in run run_sequential(args=args, logger=logger) File "/Users/lucas/Documents/pymarl-master/src/run.py", line 166, in run_sequential episode_batch = runner.run(test_mode=False) File "/Users/lucas/Documents/pymarl-master/src/runners/episode_runner.py", line 49, in run self.reset() File "/Users/lucas/Documents/pymarl-master/src/runners/episode_runner.py", line 45, in reset self.env.reset() File "/Users/lucas/miniconda3/lib/python3.6/site-packages/smac/env/starcraft2/starcraft2.py", line 347, in reset self._launch() File "/Users/lucas/miniconda3/lib/python3.6/site-packages/smac/env/starcraft2/starcraft2.py", line 297, in _launch self._sc2_proc = self._run_config.start(window_size=self.window_size, want_rgb=False) File "/Users/lucas/miniconda3/lib/python3.6/site-packages/pysc2/run_configs/platforms.py", line 88, in start self, exec_path=exec_path, version=self.version, **kwargs) File "/Users/lucas/miniconda3/lib/python3.6/site-packages/pysc2/lib/sc_process.py", line 143, in init self._host, self._port, self, timeout_seconds=timeout_seconds) File "/Users/lucas/miniconda3/lib/python3.6/site-packages/pysc2/lib/remote_controller.py", line 146, in init sock = self._connect(host, port, proc, timeout_seconds) File "/Users/lucas/miniconda3/lib/python3.6/site-packages/pysc2/lib/stopwatch.py", line 212, in _stopwatch return func(*args, **kwargs) File "/Users/lucas/miniconda3/lib/python3.6/site-packages/pysc2/lib/remote_controller.py", line 180, in _connect raise ConnectError("Failed to connect to the SC2 websocket. Is it up?") pysc2.lib.remote_controller.ConnectError: Failed to connect to the SC2 websocket. Is it up?

During handling of the above exception, another exception occurred:

Traceback (most recent calls WITHOUT Sacred internals): File "/Users/lucas/miniconda3/lib/python3.6/contextlib.py", line 99, in exit self.gen.throw(type, value, traceback) File "/Users/lucas/miniconda3/lib/python3.6/subprocess.py", line 1469, in wait raise TimeoutExpired(self.args, timeout) subprocess.TimeoutExpired: Command '['tee', '-a', '/var/folders/vy/0tj1lc296lnfn5twwx3gxdj40000gq/T/tmp9434b86g']' timed out after 1 seconds

lcassano avatar Nov 05 '20 10:11 lcassano

Same problem, have you addressed it? sir

Sud0x67 avatar May 14 '21 02:05 Sud0x67