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

get_game_version import error #2

Open
koaning opened this issue Jun 28, 2019 · 4 comments
Open

get_game_version import error #2

koaning opened this issue Jun 28, 2019 · 4 comments

Comments

@koaning
Copy link

koaning commented Jun 28, 2019

I'd love to play with this repo, but it seems that there's a small bug in it.

(venv) ➜  SC2CombatPredictor git:(master) ✗ ls replays
SC2CombatGenerator.SC2Replay
(venv) ➜  SC2CombatPredictor git:(master) ✗ python -m bin.combat_observer
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/vincent/Development/starcraft-stuff/SC2CombatPredictor/bin/combat_observer.py", line 21, in <module>
    from pysc2.bin.play import get_game_version
ImportError: cannot import name 'get_game_version'
@koaning
Copy link
Author

koaning commented Jun 28, 2019

This was also happening after installing via

pip install git+https://github.com/deepmind/pysc2

@lschmelzeisen
Copy link
Owner

lschmelzeisen commented Jul 2, 2019

The API on the PySC2 master probably changed since I have written this. Back then the version available on PyPI was hopelessly outdated, so there was no other choice than to write against the master. Maybe I will find the time this week to update the code to work with the recent version on PyPI (pull requests welcome of course :D).

Out of interest: how did you manage to find this repo?

@koaning
Copy link
Author

koaning commented Jul 2, 2019

I found it by endlessly googling. I'm also completely unfamiliar with the PySC2 api but I had a brainfart that I wanted to test. Turns out there's a maths formula that describes who might win a battle and I figured it'd be fun to test how well the formula holds up when you run it in a simulator. That's how I found this repo.

I gotta say; I have a mac. That might not help.

Also, and I am not kidding, I organise PyData Amsterdam. If you're ever around Amsterdam I would love to host a talk on this topic. Any simulations that you might've run sounds like fun stuff to do a talk about.

@koaning
Copy link
Author

koaning commented Jul 2, 2019

If there's an easy way to measure the number of marines on each side over time that'd be enough for my usecase. It's just the pysc2 documentation is really poor. Have you had any luck finding a good API description?

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

2 participants