GraylinKim / sc2reader

A python library that extracts data from various Starcraft II resources to power tools and services for the SC2 community. Who doesn't want to hack on the games they play?
http://sc2reader.readthedocs.org
MIT License
413 stars 85 forks source link

Tracker event parsing dies due to pids not being what were expected #135

Closed dsjoerg closed 11 years ago

dsjoerg commented 11 years ago

My 5-year-old daughter asked to play Starcraft! So we create an account for her and do the Spawning Pool thing.

Here's the replay: http://drop.sc/341365/d

Sadly it can't be parsed due to some nasty issue with unexpected pids, which I believe is the same as the issues discussed here: https://github.com/Blizzard/s2protocol/issues/8

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/david/Dropbox/Programming/esdb/esdb/vendor/ggpyjobs/src/sc2reader/sc2reader/factories.py", line 66, in load_replay
    return self.load(Replay, source, options, **new_options)
  File "/Users/david/Dropbox/Programming/esdb/esdb/vendor/ggpyjobs/src/sc2reader/sc2reader/factories.py", line 135, in load
    return self._load(cls, resource, filename=filename, options=options)
  File "/Users/david/Dropbox/Programming/esdb/esdb/vendor/ggpyjobs/src/sc2reader/sc2reader/factories.py", line 145, in _load
    obj = cls(resource, filename=filename, factory=self, **options)
  File "/Users/david/Dropbox/Programming/esdb/esdb/vendor/ggpyjobs/src/sc2reader/sc2reader/resources.py", line 308, in __init__
    event.load_context(self)
  File "/Users/david/Dropbox/Programming/esdb/esdb/vendor/ggpyjobs/src/sc2reader/sc2reader/events/tracker.py", line 181, in load_context
    self.player = replay.player[self.pid]
KeyError: 4
GraylinKim commented 11 years ago

Closing as a duplicate of #131.