-
Notifications
You must be signed in to change notification settings - Fork 144
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
Event.player is None #91
Comments
Yes. This issue was closed without a proper fix in #62. |
Is it all events in this replay that have the player set to none, or is it only specific events that are missing the player? If it's the latter, can we figure out what the reason is? I think this is worth solving, but I don't have much context or any intuition for why it could be happening |
Hi and thanks for the comment. It is, as far as I can see, for all events and for all the players. Digging in the code I figured out that the constructor of the |
Okay, I figured out that this only happens when using replay = sc2reader.load_replay(
replay_file,
engine=sc2reader.engine.GameEngine(plugins=[TestPlugin()])) but it does not happen if you use sc2reader.engine.register_plugin(TestPlugin())
replay = sc2reader.load_replay(replay_file) |
Oh, that is fascinating. I have to admit that despite being the current maintainer for this library, I am completely unfamiliar with this code =P Since you have a reasonable workaround, I feel better on the urgency of this. Maybe I'll take a stab at this sometime, but others are welcome to investigate and share what you find. The relevant logic is presumably in https://github.com/ggtracker/sc2reader/blob/71d0903a60616798373565fcf658b722eba3475f/sc2reader/factories/sc2factory.py |
The problem here is
|
When using the
APMTracker
plugin, it became clear to me that the events that the plugin parses the attributeplayer
isNone
.Code to reproduce:
which outputs a bunch of
None
s.By the way, this also means that the
APMTracker
plugin does not work, and that it is very difficult to write functional plugins.The text was updated successfully, but these errors were encountered: