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

'NoneType' object has no attribute 'split' on certain maps #68

Closed
dsjoerg opened this issue Aug 16, 2012 · 3 comments
Closed

'NoneType' object has no attribute 'split' on certain maps #68

dsjoerg opened this issue Aug 16, 2012 · 3 comments
Assignees

Comments

@dsjoerg
Copy link
Collaborator

dsjoerg commented Aug 16, 2012

Happens on several of my replays, including:
ggtracker.com/replays/205113/getreplay

guessing that

    game_strings = self.archive.read_file('enUS.SC2Data\LocalizedData\GameStrings.txt')

sometimes sets game_strings to None.

This causes sc2reader to die when parsing the replay.

sc2gears can't parse this one either.

2.2% of our replay sample can't parse because of this (12 out of 549).

@ghost ghost assigned GraylinKim Aug 16, 2012
@GraylinKim
Copy link
Owner

Ah I see. This was probably destined to be broken code. Of course not all maps have localized data for enUS.

A better solution is needed here but in the mean time I will check to see if the currently used file exists before attempting to use it. This of course means that the your code shouldn't rely on the map meta-data if you are supporting non US map files. The replay.map_name attribute is the map name derived from the replay and not the map file. It will be more reliable.

GraylinKim added a commit that referenced this issue Aug 16, 2012
@GraylinKim
Copy link
Owner

I am considering this closed. Support for map meta data outside of the enUS localization can be considered a feature request at this point.

@dsjoerg
Copy link
Collaborator Author

dsjoerg commented Aug 22, 2012

Cool, I tried the replay mentioned in this Issue and it no longer dies in this way.

StoicLoofah referenced this issue in StoicLoofah/sc2reader Nov 19, 2018
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