Skip to content

Event.player is None #91

@rcortini

Description

@rcortini

When using the APMTracker plugin, it became clear to me that the events that the plugin parses the attribute player is None.

Code to reproduce:

class TestPlugin(object):

    name = 'TestPlugin'
            
    def handleCommandEvent(self, event, replay):
        print(event.player)
                
replay_file = '/home/rcortini/soft/sc2reader/test_replays/4.7.0.70154/1.SC2Replay'
replay = sc2reader.load_replay(
    replay_file,
    engine=sc2reader.engine.GameEngine(plugins=[TestPlugin()]))

which outputs a bunch of Nones.

By the way, this also means that the APMTracker plugin does not work, and that it is very difficult to write functional plugins.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions