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

s2_cli.py doesn't print game, message, or tracker events when using Python 3 #96

Open
mikeuehara opened this issue Sep 15, 2019 · 1 comment

Comments

@mikeuehara
Copy link

I've been having issues with the s2_cli.py script in Python 3.7. The game, message, and tracker events for a replay get printed just fine in Python 2.7, but never in Python 3.7.

After some debugging, I think I've narrowed it down to how the built-in map() function has changed between Python 2 and Python 3. map() returns a list in Python 2, but it returns an iterator in Python 3. So:

map(process_event, protocol.decode_replay_game_events(contents))

calls process_event on each event in Python 2, but does nothing in Python 3 until you start stepping through the iterator.

I fixed this issue in my local copy, but I haven't really used github much so I'll look into making a pull request.

@NoviceYin
Copy link

same here, so I coded it...

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