Blizzard / s2client-proto

StarCraft II Client - protocol definitions used to communicate with StarCraft II.
MIT License
3.76k stars 430 forks source link

Failed to connect to the SC2 websocket #176

Open wutaosuper opened 4 years ago

wutaosuper commented 4 years ago

(base) C:\Users\wt>python -m pysc2.bin.agent --map Simple64 pygame 1.9.6 Hello from the pygame community. https://www.pygame.org/contribute.html I0609 23:01:10.829354 1208 sc_process.py:135] Launching SC2: D:\StarCraft II\Ve rsions/Base78285\SC2_x64.exe -listen 127.0.0.1 -port 16102 -dataDir D:\StarCraft II\ -tempDir C:\Users\wt\AppData\Local\Temp\sc-sh9lx0zw\ -displayMode 0 -window width 640 -windowheight 480 -windowx 50 -windowy 50 I0609 23:01:10.853355 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 0, running: True I0609 23:01:11.864413 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 1, running: True I0609 23:01:12.865470 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 2, running: True I0609 23:01:13.866528 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 3, running: True I0609 23:01:14.867585 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 4, running: True I0609 23:01:15.868642 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 5, running: True I0609 23:01:16.869699 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 6, running: True I0609 23:01:17.870757 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 7, running: True I0609 23:01:18.871814 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 8, running: True I0609 23:01:19.874871 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 9, running: True I0609 23:01:20.879929 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 10, running: True I0609 23:01:21.883986 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 11, running: True I0609 23:01:22.886044 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 12, running: True I0609 23:01:23.889101 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 13, running: True I0609 23:01:24.893158 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 14, running: True I0609 23:01:25.897216 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 15, running: True I0609 23:01:26.901273 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 16, running: True I0609 23:01:27.904330 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 17, running: True I0609 23:01:28.906388 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 18, running: True I0609 23:01:29.910445 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 19, running: True I0609 23:01:30.913503 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 20, running: True I0609 23:01:31.916560 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 21, running: True I0609 23:01:32.919617 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 22, running: True I0609 23:01:33.924675 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 23, running: True I0609 23:01:34.926732 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 24, running: True I0609 23:01:35.929790 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 25, running: True I0609 23:01:36.931847 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 26, running: True I0609 23:01:37.933904 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 27, running: True I0609 23:01:38.936962 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 28, running: True I0609 23:01:39.940019 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 29, running: True I0609 23:01:40.943076 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 30, running: True I0609 23:01:41.947134 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 31, running: True I0609 23:01:42.950191 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 32, running: True I0609 23:01:43.954249 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 33, running: True I0609 23:01:44.957306 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 34, running: True I0609 23:01:45.959363 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 35, running: True I0609 23:01:46.963421 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 36, running: True I0609 23:01:47.965478 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 37, running: True I0609 23:01:48.968535 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 38, running: True I0609 23:01:49.971593 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 39, running: True I0609 23:01:50.974650 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 40, running: True I0609 23:01:51.978708 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 41, running: True I0609 23:01:52.980765 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 42, running: True I0609 23:01:53.982822 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 43, running: True I0609 23:01:54.987880 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 44, running: True I0609 23:01:55.991937 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 45, running: True I0609 23:01:56.994994 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 46, running: True I0609 23:01:57.997052 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 47, running: True I0609 23:01:59.000109 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 48, running: True I0609 23:02:00.006167 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 49, running: True I0609 23:02:01.010224 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 50, running: True I0609 23:02:02.012281 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 51, running: True I0609 23:02:03.014339 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 52, running: True I0609 23:02:04.017396 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 53, running: True I0609 23:02:05.020453 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 54, running: True I0609 23:02:06.023511 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 55, running: True I0609 23:02:07.025568 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 56, running: True I0609 23:02:08.026625 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 57, running: True I0609 23:02:09.029683 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 58, running: True I0609 23:02:10.032740 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 59, running: True I0609 23:02:11.035798 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 60, running: True I0609 23:02:12.038855 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 61, running: True I0609 23:02:13.040912 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 62, running: True I0609 23:02:14.042970 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 63, running: True I0609 23:02:15.045027 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 64, running: True I0609 23:02:16.048084 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 65, running: True I0609 23:02:17.051142 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 66, running: True I0609 23:02:18.054199 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 67, running: True I0609 23:02:19.056256 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 68, running: True I0609 23:02:20.058314 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 69, running: True I0609 23:02:21.060371 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 70, running: True I0609 23:02:22.063428 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 71, running: True I0609 23:02:23.067486 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 72, running: True I0609 23:02:24.071543 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 73, running: True I0609 23:02:25.073601 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 74, running: True I0609 23:02:26.075658 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 75, running: True I0609 23:02:27.080715 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 76, running: True I0609 23:02:28.083773 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 77, running: True I0609 23:02:29.087830 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 78, running: True I0609 23:02:30.090888 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 79, running: True I0609 23:02:31.091945 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 80, running: True I0609 23:02:32.095002 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 81, running: True I0609 23:02:33.099060 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 82, running: True I0609 23:02:34.101117 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 83, running: True I0609 23:02:35.104174 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 84, running: True I0609 23:02:36.105231 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 85, running: True I0609 23:02:37.108289 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 86, running: True I0609 23:02:38.110346 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 87, running: True I0609 23:02:39.114404 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 88, running: True I0609 23:02:40.117461 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 89, running: True I0609 23:02:41.121518 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 90, running: True I0609 23:02:42.123576 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 91, running: True I0609 23:02:43.126633 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 92, running: True I0609 23:02:44.130691 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 93, running: True I0609 23:02:45.133748 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 94, running: True I0609 23:02:46.136805 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 95, running: True I0609 23:02:47.138863 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 96, running: True I0609 23:02:48.140920 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 97, running: True I0609 23:02:49.143977 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 98, running: True I0609 23:02:50.147035 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 99, running: True I0609 23:02:51.149092 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 100, running: True I0609 23:02:52.152149 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 101, running: True I0609 23:02:53.154206 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 102, running: True I0609 23:02:54.156264 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 103, running: True I0609 23:02:55.158321 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 104, running: True I0609 23:02:56.160378 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 105, running: True I0609 23:02:57.162436 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 106, running: True I0609 23:02:58.164493 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 107, running: True I0609 23:02:59.166551 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 108, running: True I0609 23:03:00.168608 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 109, running: True I0609 23:03:01.170665 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 110, running: True I0609 23:03:02.172723 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 111, running: True I0609 23:03:03.175780 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 112, running: True I0609 23:03:04.178837 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 113, running: True I0609 23:03:05.182895 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 114, running: True I0609 23:03:06.184952 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 115, running: True I0609 23:03:07.187009 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 116, running: True I0609 23:03:08.190067 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 117, running: True I0609 23:03:09.193124 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 118, running: True I0609 23:03:10.196181 1208 remote_controller.py:167] Connecting to: ws://127.0. 0.1:16102/sc2api, attempt: 119, running: True I0609 23:03:11.298244 1208 sc_process.py:232] Shutdown gracefully. I0609 23:03:11.299244 1208 sc_process.py:210] Shutdown with return code: 1 Traceback (most recent call last): File "C:\Users\wt\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\Users\wt\Anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\wt\Anaconda3\lib\site-packages\pysc2\bin\agent.py", line 164, i n app.run(main) File "C:\Users\wt\Anaconda3\lib\site-packages\absl\app.py", line 299, in run _run_main(main, args) File "C:\Users\wt\Anaconda3\lib\site-packages\absl\app.py", line 250, in run main sys.exit(main(argv)) File "C:\Users\wt\Anaconda3\lib\site-packages\pysc2\bin\agent.py", line 150, i n main run_thread(agent_classes, players, FLAGS.map, FLAGS.render) File "C:\Users\wt\Anaconda3\lib\site-packages\pysc2\bin\agent.py", line 105, i n run_thread visualize=visualize) as env: File "C:\Users\wt\Anaconda3\lib\site-packages\pysc2\env\sc2_env.py", line 287, in init self._launch_game() File "C:\Users\wt\Anaconda3\lib\site-packages\pysc2\env\sc2_env.py", line 358, in _launch_game for interface in self._interface_options] File "C:\Users\wt\Anaconda3\lib\site-packages\pysc2\env\sc2_env.py", line 358, in for interface in self._interface_options] File "C:\Users\wt\Anaconda3\lib\site-packages\pysc2\run_configs\platforms.py", line 88, in start self, exec_path=exec_path, version=self.version, *kwargs) File "C:\Users\wt\Anaconda3\lib\site-packages\pysc2\lib\sc_process.py", line 1 43, in init self._host, self._port, self, timeout_seconds=timeout_seconds) File "C:\Users\wt\Anaconda3\lib\site-packages\pysc2\lib\remote_controller.py", line 146, in init sock = self._connect(host, port, proc, timeout_seconds) File "C:\Users\wt\Anaconda3\lib\site-packages\pysc2\lib\stopwatch.py", line 21 2, in _stopwatch return func(args, **kwargs) File "C:\Users\wt\Anaconda3\lib\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? I0609 23:03:11.487255 1208 sc2_env.py:752] Environment Close

What are the causes of the mistakes and how to solve them? my sc2 version : 4.11.4 my os version: windows 7

Han-326 commented 2 months ago

同样的错误,请问解决了吗,怎么解决的