ibm-dev-incubator / demoparser

Apache License 2.0
34 stars 10 forks source link

Decoding error on a particular Demo #10

Closed kpei closed 5 years ago

kpei commented 5 years ago

Is there a way to fix this? It looks like it's unable to decode a prop string.

See the demo here: https://drive.google.com/file/d/1ykiiyejuvVLajRMO3dM4u9zU72U-wO3O/view?usp=sharing

Small snippet of the error:

Traceback (most recent call last):
  File "demoparser/util.pyx", line 76, in demoparser.util.parse_entity_update
  File "demoparser/props.pyx", line 40, in demoparser.props.Decoder.decode
  File "demoparser/props.pyx", line 152, in demoparser.props.Decoder.decode_string
  File "demoparser/bitbuffer.pyx", line 219, in demoparser.bitbuffer.Bitbuffer.read_string
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 30: unexpected end of data
Exception ignored in: 'demoparser.demofile.DemoFile.read_new_entity'
Traceback (most recent call last):
  File "demoparser/util.pyx", line 76, in demoparser.util.parse_entity_update
  File "demoparser/props.pyx", line 40, in demoparser.props.Decoder.decode
  File "demoparser/props.pyx", line 152, in demoparser.props.Decoder.decode_string
  File "demoparser/bitbuffer.pyx", line 219, in demoparser.bitbuffer.Bitbuffer.read_string
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 30: unexpected end of data
AttributeError: 'NoneType' object has no attribute 'class_id'
Exception ignored in: 'demoparser.demofile.DemoFile.read_new_entity'
AttributeError: 'NoneType' object has no attribute 'class_id'
AttributeError: 'NoneType' object has no attribute 'class_id'
Exception ignored in: 'demoparser.demofile.DemoFile.read_new_entity'
AttributeError: 'NoneType' object has no attribute 'class_id'
AssertionError
Exception ignored in: 'demoparser.bitbuffer.Bitbuffer.read_var_int'
AssertionError
kpei commented 5 years ago

Looks like its these russian guys in particular: Another match that i can't parse the text - CSGO demo manager handles it fine so it must be some sort of decoding issue with unicode. https://popflash.site/match/448558

kpei commented 5 years ago

adding ignore to bitbuffer.pyx decode solved the issue