Closed bozdoz closed 11 years ago
Can you supply the replay file you're using, and a full transcript of the commands you're running? Also which version of sc2reader are you using -- HEAD of master ?
I just tested with the test replays in github, and it worked fine. My replay files don't seem to work.
I uploaded it to http://bozdoz.ca/blinked.SC2Replay
Commands I'm running:
import sc2reader r = sc2reader.read_file('blinked.SC2Replay')
Version is 0.3.2
Ah OK, 0.3.2 is a very old version, that last existed a year ago. https://github.com/GraylinKim/sc2reader/commit/e226a197a2a9f3349bce7b858b78b6838a27336b
Out of curiosity, how did you get that version? By doing a "pip install" ?
Anyway, to get a newer version, get the code from github:
git clone git@github.com:GraylinKim/sc2reader.git
And then you'll be able to:
>>> import sc2reader
>>> fun = sc2reader.load_replay("/Users/david/Downloads/blinked.SC2Replay")
>>> fun.players
[Player 1 - fox (Terran), Player 2 - bozdoz (Protoss), Player 3 - Probability (Zerg), Player 4 - Dexter (Zerg)]
Perfect. Yes I used pip. It was the first recommendation on the http://pypi.python.org/pypi/sc2reader page. shrug. Thanks! I'll take a look at updating.
Sorry about that.
I've been a terrible maintainer as far as doing releases goes. I'm currently prioritizing HotS support. When I have that reasonably stable I'll push another release out. It seems like most people eventually find Github anyway.
Not sure where I'm going wrong here. Using sc2reader.read_file(), but it throws a TypeError: ord() expected a character, but string of length 0 found. I'm using it the way that is described at http://pypi.python.org/pypi/sc2reader, but it doesn't seem able to parse a replay file.