Skip to content

"ProtocolError" and "InvalidMapData" #369

@gigg1

Description

@gigg1

Hello, I encountered an issue at runtime when I ran the MARL algorithm.
When I run the algorithm for a while, it sometimes shows that the temp map file is not valid, and the program ends.

Because I can successfully start and restart the SC2 game while the program is running, I think the maps I installed are correct. For example, when it is successfully restarted:

----------- ID: 113, Training for 284642/2050000
[INFO 16:50:39] absl Shutdown gracefully.
[INFO 16:50:39] absl Shutdown with return code: 1
[INFO 16:50:39] absl Launching SC2: C:/Program Files (x86)/StarCraft II\Versions/Base94137\SC2_x64.exe -listen 127.0.0.1 -port 58017 -dataDir C:/Program Files (x86)/StarCraft II\ -tempDir C:\Users\XXX\AppData\Local\Temp\sc-zeu63d73\ -displayMode 0 -windowwidth 1920 -windowheight 1200 -windowx 50 -windowy 50
[INFO 16:50:39] absl Connecting to: ws://127.0.0.1:58017/sc2api, attempt: 0, running: True
[INFO 16:50:42] absl Connecting to: ws://127.0.0.1:58017/sc2api, attempt: 1, running: True
----------- ID: 113, Training for 284652/2050000

This error is usually random in the middle of the algorithm running. The following is the error information:
Error:

----------- ID: 113, Training for 339975/2050000
[INFO 17:28:26] absl Shutdown gracefully.
[INFO 17:28:26] absl Shutdown with return code: 1
[INFO 17:28:26] absl Launching SC2: C:/Program Files (x86)/StarCraft II\Versions/Base94137\SC2_x64.exe -listen 127.0.0.1 -port 61797 -dataDir C:/Program Files (x86)/StarCraft II\ -tempDir C:\Users\XXX~1\AppData\Local\Temp\sc-4_gk43t4\ -displayMode 0 -windowwidth 1920 -windowheight 1200 -windowx 50 -windowy 50
[INFO 17:28:26] absl Connecting to: ws://127.0.0.1:61797/sc2api, attempt: 0, running: True
[INFO 17:28:29] absl Connecting to: ws://127.0.0.1:61797/sc2api, attempt: 1, running: True
[DEBUG 17:28:30] pymarl Stopping Heartbeat
[ERROR 17:28:30] pymarl Failed after 4:03:09!
Traceback (most recent calls WITHOUT Sacred internals):
  File "C:\Users\XXX\anaconda3\envs\gacg_gpu_smac\lib\site-packages\smac\env\starcraft2\starcraft2.py", line 477, in step
    self._controller.actions(req_actions)
  File "C:\Users\XXX\anaconda3\envs\gacg_gpu_smac\lib\site-packages\pysc2\lib\remote_controller.py", line 81, in _skip_status
    return func(self, *args, **kwargs)
  File "C:\Users\XXX\anaconda3\envs\gacg_gpu_smac\lib\site-packages\pysc2\lib\remote_controller.py", line 94, in _valid_status
    func.__name__, self.status, ",".join(map(str, valid))))
**pysc2.lib.protocol.ProtocolError: `actions` called while in state: Status.ended, valid: (Status.in_game)**

During handling of the above exception, another exception occurred:

Traceback (most recent calls WITHOUT Sacred internals):
  File "src/main.py", line 41, in my_main
    run(_run, config, _log)
  File "D:\X\GACG-main\src\run.py", line 164, in run
    run_sequential(args=args, logger=logger)
  File "D:\X\GACG-main\src\run.py", line 404, in run_sequential
    episode_batch, return_list, _ = runner.run(test_mode=False)
  File "D:\X\GACG-main\src\runners\episode_runner.py", line 80, in run
    reward, terminated, env_info = self.env.step(actions[0])
  File "C:\Users\XXX\anaconda3\envs\gacg_gpu_smac\lib\site-packages\smac\env\starcraft2\starcraft2.py", line 483, in step
    self.full_restart()
  File "C:\Users\XXX\anaconda3\envs\gacg_gpu_smac\lib\site-packages\smac\env\starcraft2\starcraft2.py", line 449, in full_restart
    self._launch()
  File "C:\Users\XXX\anaconda3\envs\gacg_gpu_smac\lib\site-packages\smac\env\starcraft2\starcraft2.py", line 343, in _launch
    self._controller.create_game(create)
  File "C:\Users\XXX\anaconda3\envs\gacg_gpu_smac\lib\site-packages\pysc2\lib\remote_controller.py", line 95, in _valid_status
    return func(self, *args, **kwargs)
  File "C:\Users\XXX\anaconda3\envs\gacg_gpu_smac\lib\site-packages\pysc2\lib\remote_controller.py", line 70, in _check_error
    return check_error(func(*args, **kwargs), error_enum)
  File "C:\Users\XXX\anaconda3\envs\gacg_gpu_smac\lib\site-packages\pysc2\lib\remote_controller.py", line 61, in check_error
    raise RequestError("%s.%s: '%s'" % (enum_name, error_name, details), res)
**pysc2.lib.remote_controller.RequestError: SC2APIProtocol.ResponseCreateGame.Error.InvalidMapData: 'temporary map 'C:\Users\XXX\AppData\Local\Temp\StarCraft II\TempLaunchMap.SC2Map' has invalid data.'**

[INFO 17:28:30] absl Shutdown gracefully.
[INFO 17:28:30] absl Shutdown with return code: 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions