ggtracker / ggtracker/sc2reader
Cannot load reply with load_game_summary
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 169
- Forks
- 152
- PR merge metrics
- No merged PRs in 30d
Description
summary = sc2reader.load_game_summary(replay_file)
I get the following error
summary = sc2reader.load_game_summary(replay_file)
File "C:\Users\ASUS\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\sc2reader\factories\sc2factory.py", line 113, in load_game_summary
return self.load(GameSummary, source, options, **new_options)
File "C:\Users\ASUS\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\sc2reader\factories\sc2factory.py", line 143, in load
return self._load(cls, resource, filename=filename, options=options)
File "C:\Users\ASUS\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\sc2reader\factories\sc2factory.py", line 152, in _load
obj = cls(resource, filename=filename, factory=self, **options)
File "C:\Users\ASUS\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\sc2reader\resources.py", line 1079, in init
buffer = BitPackedDecoder(zlib.decompress(summary_file.read()[16:]))
zlib.error: Error -3 while decompressing data: incorrect header check
It's happening with all my replays.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with factories/sc2factory.py and resources.py, especially the load_game_summary path and the BitPackedDecoder call shown in the traceback. Reproduce the failure with a representative replay and inspect the summary data passed to zlib; done means load_game_summary succeeds for the affected replays without the decompression error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100