hohav / py-slippi

Python library for parsing SSBM replay files
MIT License
56 stars 25 forks source link

char id 33 not valid id bug #12

Closed hoppalot22 closed 4 years ago

hoppalot22 commented 4 years ago

Any idea why this game gives me this error when I attempt to use the pyslippi module?

image broken.txt

hohav commented 4 years ago

Thanks for the report. When I try loading that file with py-slippi 1.3.1, I get a different error:

ubjson.decoder.DecoderException: ('Insufficient (partial) input (bytes array) (at byte 2215929)', 2215929)

Could you tell me more about your setup? Especially the platform you're using to play Melee and the version of Slippi you're running.

hoppalot22 commented 4 years ago

Hey Hohav, This file was recorded on at a tourney with a wii with slippi nintendont(Not sure which version, if its important I can check)

The game had ucf turned on. I have attached the 4 replays (from over 100) which threw this error. Thanks!  

Game_20191019T150209.txt Game_20191019T162403.txt Game_20191019T114334.txt ). Game_20191019T162657.txt

hohav commented 4 years ago

I tried parsing each of those files with the official javascript parser and they all gave me errors. So it looks like these files are corrupted, and if so there's nothing py-slippi can do.

hohav commented 4 years ago

Actually I spoke too soon. The files you posted here are indeed corrupt, but I think that's due to some mangling done by GitHub(?). Using the file you posted on discord, I was able to duplicate your error and verify that it was a bug in py-slippi: it was trying to parse the character ID even for empty ports, which breaks if the character ID is an invalid value like 33.

Can you try the latest master (5c7f5a7b68792dceb3a195694657ce71fda160c8) and tell me if that fixes the problem for you? Also would you mind if I use that replay in py-slippi's test suite?

hohav commented 4 years ago

Closing due to inactivity and because I believe this has been resolved (please re-open if not).