pysc2 icon indicating copy to clipboard operation
pysc2 copied to clipboard

findCaller from absl crashing and rendering crash on linux

Open tbomonfils opened this issue 5 years ago • 3 comments

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,

tbomonfils avatar Dec 11 '19 09:12 tbomonfils

First problem should be fixed now, but you need to install latest absl-py, e.g. via

pip install absl-py --upgrade

inoryy avatar Dec 18 '19 06:12 inoryy

any update on second error? I got the same issue.

Denys88 avatar Dec 23 '19 06:12 Denys88

Thank you for the fix, I'll try it as soon as I can spare a bit of time.

Regards

tbomonfils avatar Jan 08 '20 13:01 tbomonfils