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

Empty Response for Stats, JSON Arguments #64

Closed
AlexNewell opened this issue Jan 19, 2018 · 2 comments
Closed

Empty Response for Stats, JSON Arguments #64

AlexNewell opened this issue Jan 19, 2018 · 2 comments

Comments

@AlexNewell
Copy link

Attempted the following in a Windows 10 cmd prompt using Python 2.7 with the latest master branch of HeroProtocol and a StormReplay from today:

python.exe D:\HeroProtocol\heroprotocol-master\heroprotocol.py --stats "D:\HeroProtocol\output\Test_20180118\Towers of Doom 20180118.StormReplay" > "D:\HeroProtocol\output\Test_20180118\Towers of Doom 20180118 stats.txt"

This returns an empty txt document, as does the "--json" argument. Removing the write-to-file argument does not solve the issue; instead, the terminal does not print anything. Other arguments, however, appear to work as intended, i.e. "--gameevents" returns a 50 MB file with game events.

Please let me know if the Stats and Json arguments are broken functionality, or if I am not using them correctly. Thanks!

@mikeeheler
Copy link
Contributor

Hi @AlexNewell, thanks for letting us know about this and sorry for the delayed response.

It's true that the --stats and --json options are not compatible right now since --stats is handled separately from the other data dump modes and it was missed. I've added a task to address this to my backlog and expect to get to it soon.

@mikeeheler
Copy link
Contributor

mikeeheler commented May 25, 2018

Update

See this issue here: #36

Short answer is --stats isn't meant to output anything replay-related. It reports stuff specific to the execution of the script and it dumps it to stderr so that stdout can be redirected to the output file. It doesn't show anything because there's no tracker event running.

To see what it's meant to do, run something like python heroprotocol.py --gameevents --stats --json "MyReplay.StormReplay" > gameevents.json.

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