Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

findCaller from absl crashing and rendering crash on linux #286

Open
tbomonfils opened this issue Dec 11, 2019 · 3 comments
Open

findCaller from absl crashing and rendering crash on linux #286

tbomonfils opened this issue Dec 11, 2019 · 3 comments

Comments

@tbomonfils
Copy link

tbomonfils commented Dec 11, 2019

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 tbomonfils changed the title findCaller from absl crashing findCaller from absl crashing and rendering crash on linux Dec 11, 2019
@inoryy
Copy link
Contributor

inoryy commented Dec 18, 2019

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

pip install absl-py --upgrade

@Denys88
Copy link

Denys88 commented Dec 23, 2019

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

@tbomonfils
Copy link
Author

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

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants