LaihoE / demoparser

Counter-Strike 2 replay parser for Python and JavaScript
MIT License
290 stars 30 forks source link

`test_parse_events_with_props` fails #179

Closed JanEricNitschke closed 3 months ago

JanEricNitschke commented 3 months ago

So i dont know yet if the failure is due to changes i have made, yet, but i do not think that is (only) the case.

The first failure is simply due to the shapes of the actual and expected dataframes not matching.

DataFrame shape mismatch
[left]:  (1, 3)
[right]: (1, 2)

If i print the frames i get this:

Actual event:
     game_time   tick  total_rounds_played
0  1285.578125  82195                   12
Expected event:
     game_time   tick
0  1285.578125  82195

Where the actual results makes sense to me because the "total_rounds_played" column is explicitly requested: https://github.com/LaihoE/demoparser/blob/main/src/python/tests/e2e_test.py#L26

If i remove that column then i get an encoding error:

Traceback (most recent call last):
  File "D:\CSGO\ML\demoparser\src\python\tests\e2e_test.py", line 32, in test_parse_events_with_props
    print(event[1])
  File "C:\Users\Jan-Eric\AppData\Local\Programs\Python\Python311\Lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'charmap' codec can't encode characters in position 290-295: character maps to <undefined>
LaihoE commented 3 months ago

These tests are not up to date.