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

Replay parsing failures #125

Open
eudaimonstro opened this issue Sep 3, 2020 · 1 comment
Open

Replay parsing failures #125

eudaimonstro opened this issue Sep 3, 2020 · 1 comment

Comments

@eudaimonstro
Copy link

eudaimonstro commented Sep 3, 2020

Trying to load replays at load_level=2 and sc2reader errors out with the following stack trace:

Traceback (most recent call last):
File "main.py", line 443, in
main(sys.argv[1:])
File "main.py", line 185, in main
replay_list = list(replays)
File "/home/steve/workspace/trueskill/venv/lib/python3.7/site-packages/sc2reader/factories/sc2factory.py", line 146, in load_all
yield self._load(cls, resource, filename=filename, options=options)
File "/home/steve/workspace/trueskill/venv/lib/python3.7/site-packages/sc2reader/factories/sc2factory.py", line 151, in _load
obj = cls(resource, filename=filename, factory=self, **options)
File "/home/steve/workspace/trueskill/venv/lib/python3.7/site-packages/sc2reader/resources.py", line 301, in init
self._read_data(data_file, self._get_reader(data_file))
File "/home/steve/workspace/trueskill/venv/lib/python3.7/site-packages/sc2reader/resources.py", line 893, in _read_data
self.raw_data[data_file] = reader(data, self)
File "/home/steve/workspace/trueskill/venv/lib/python3.7/site-packages/sc2reader/readers.py", line 274, in call
for i in range(data.read_bits(5))
File "/home/steve/workspace/trueskill/venv/lib/python3.7/site-packages/sc2reader/readers.py", line 274, in
for i in range(data.read_bits(5))
File "/home/steve/workspace/trueskill/venv/lib/python3.7/site-packages/sc2reader/readers.py", line 197, in
for i in range(
File "/home/steve/workspace/trueskill/venv/lib/python3.7/site-packages/sc2reader/decoders.py", line 210, in read_uint32
data = self._buffer.read_uint32()
File "/home/steve/workspace/trueskill/venv/lib/python3.7/site-packages/sc2reader/decoders.py", line 91, in read_uint32
return self._unpack_int(self.read(4))[0]
struct.error: unpack requires a buffer of 4 bytes

Script runs successfully when load_level=0

Here's the relevant output of sc2parse (only the errors):
pastebin

Here are archives of the offending replays:
sc2reader_replays_1.zip
sc2reader_replays_2.zip
sc2reader_replays_3.zip
sc2reader_replays_4.zip
sc2reader_replays_5.zip

@StoicLoofah
Copy link
Collaborator

@eudaimonstro Sorry for the slow reply. I forgot to deploy v1.6.0 that fixed parsing for StarCraft 2 5.0 replays. v1.5.0, which is what I suspect you had, did not work for these new replays. Can you see if it's working for you now?

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

2 participants