google-deepmind / google-deepmind/pysc2

findCaller from absl crashing and rendering crash on linux

Open
#286 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
8.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Hello here,

I have started to work on pysc2 game environment and I am encountering two issues.

First, after an install on a windows 10 computer of pysc2 via pip on a 3.8 python version, launching the simple command : 'python -m pysc2.bin.play --map Simple64'

Crashes with the following error:
'Traceback (most recent call last):
File "C:\Users\Thibaud\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 192, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Thibaud\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Thibaud\AppData\Local\Programs\Python\Python38\lib\site-packages\pysc2\bin\play.py", line 234, in
app.run(main)
File "C:\Users\Thibaud\AppData\Local\Programs\Python\Python38\lib\site-packages\absl\app.py", line 299, in run
_run_main(main, args)
File "C:\Users\Thibaud\AppData\Local\Programs\Python\Python38\lib\site-packages\absl\app.py", line 250, in _run_main
sys.exit(main(argv))
File "C:\Users\Thibaud\AppData\Local\Programs\Python\Python38\lib\site-packages\pysc2\bin\play.py", line 176, in main
with run_config.start(
File "C:\Users\Thibaud\AppData\Local\Programs\Python\Python38\lib\site-packages\pysc2\run_configs\platforms.py", line 87, in start
return sc_process.StarcraftProcess(
File "C:\Users\Thibaud\AppData\Local\Programs\Python\Python38\lib\site-packages\pysc2\lib\sc_process.py", line 135, in __init__
logging.info("Launching SC2: %s", " ".join(args))
File "C:\Users\Thibaud\AppData\Local\Programs\Python\Python38\lib\site-packages\absl\logging\__init__.py", line 338, in info
log(INFO, msg, *args, **kwargs)
File "C:\Users\Thibaud\AppData\Local\Programs\Python\Python38\lib\site-packages\absl\logging\__init__.py", line 485, in log
_absl_logger.log(standard_level, msg, *args, **kwargs)
File "C:\Users\Thibaud\AppData\Local\Programs\Python\Python38\lib\site-packages\absl\logging\__init__.py", line 1047, in log
super(ABSLLogger, self).log(level, msg, *args, **kwargs)
File "C:\Users\Thibaud\AppData\Local\Programs\Python\Python38\lib\logging\__init__.py", line 1500, in log
self._log(level, msg, args, **kwargs)
File "C:\Users\Thibaud\AppData\Local\Programs\Python\Python38\lib\logging\__init__.py", line 1565, in _log
fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
TypeError: findCaller() takes from 1 to 2 positional arguments but 3 were given'

Second, I have also made an install of pysc2 in a docker, on a linux version. And if the training works fine, but the rendering of pygames crashes with the following error message:
'Exception in thread Renderer:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.6/dist-packages/pysc2/lib/renderer_human.py", line 1706, in render_thread
self.render_obs(obs)
File "/usr/local/lib/python3.6/dist-packages/pysc2/lib/renderer_human.py", line 69, in _with_lock
return func(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/pysc2/lib/stopwatch.py", line 212, in _stopwatch
return func(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/pysc2/lib/renderer_human.py", line 1724, in render_obs
surf.draw(surf)
File "/usr/local/lib/python3.6/dist-packages/pysc2/lib/renderer_human.py", line 658, in
lambda surf: self.draw_raw_layer(surf, from_obs, name, color))
File "/usr/local/lib/python3.6/dist-packages/pysc2/lib/stopwatch.py", line 212, in _stopwatch
return func(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/pysc2/lib/renderer_human.py", line 1668, in draw_raw_layer
surf.blit_np_array(color[layer])
IndexError: index 255 is out of bounds for axis 0 with size 2'

The second error, made me try, the simple install on windows to try to have some access to a visualisation. I tryied to look for those crashes but didn't find any related subject. Any help or fix would be much appreciated.

Regards,

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.