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

UnicodeDecodeError: 'ascii' codec can't decode byte 0x8b when converting .sav to .json #97

Open
dogtoaster opened this issue Jan 31, 2024 · 0 comments
Labels
corrupted-file Issue is due to a corrupted save file

Comments

@dogtoaster
Copy link

Have you modified the save files
No

Have you tried the latest release
Yes

Describe the bug
The save file comes from a dedicated server, which keeps crashing immediately when starting with the save. I tried to load that specific save file with the tool however I'm getting error messages and no json file is created.

The error only exists with that specific save, when I'm trying the same with a new save file it's working fine and I wanted to see if I can at least salvage some part of the save game.

Following the output:

Converting D:\Palworld save\palworld-save-tools-windows-v0.15.0\Level.sav to JSON, saving to D:\Palworld save\palworld-save-tools-windows-v0.15.0\Level.sav.json
Decompressing sav file
Loading GVAS file
Traceback (most recent call last):
File "D:\Palworld save\palworld-save-tools-windows-v0.15.0\lib\archive.py", line 111, in fstring
return data.decode(encoding)
UnicodeDecodeError: 'ascii' codec can't decode byte 0x8b in position 24: ordinal not in range(128)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\Palworld save\palworld-save-tools-windows-v0.15.0\lib\archive.py", line 114, in fstring
escaped = data.decode(encoding, errors="surrogatepass")
UnicodeDecodeError: 'ascii' codec can't decode byte 0x8b in position 24: ordinal not in range(128)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "D:\Palworld save\palworld-save-tools-windows-v0.15.0\convert.py", line 115, in
main()
File "D:\Palworld save\palworld-save-tools-windows-v0.15.0\convert.py", line 53, in main
convert_sav_to_json(args.filename, output_path, args.minify_json)
File "D:\Palworld save\palworld-save-tools-windows-v0.15.0\convert.py", line 74, in convert_sav_to_json
gvas_file = GvasFile.read(raw_gvas, PALWORLD_TYPE_HINTS, PALWORLD_CUSTOM_PROPERTIES)
File "D:\Palworld save\palworld-save-tools-windows-v0.15.0\lib\gvas.py", line 125, in read
gvas_file.properties = reader.properties_until_end()
File "D:\Palworld save\palworld-save-tools-windows-v0.15.0\lib\archive.py", line 180, in properties_until_end
properties[name] = self.property(type_name, size, f"{path}.{name}")
File "D:\Palworld save\palworld-save-tools-windows-v0.15.0\lib\archive.py", line 191, in property
value = self.struct(path)
File "D:\Palworld save\palworld-save-tools-windows-v0.15.0\lib\archive.py", line 303, in struct
value = self.struct_value(struct_type, path)
File "D:\Palworld save\palworld-save-tools-windows-v0.15.0\lib\archive.py", line 339, in struct_value
return self.properties_until_end(path)
File "D:\Palworld save\palworld-save-tools-windows-v0.15.0\lib\archive.py", line 180, in properties_until_end
properties[name] = self.property(type_name, size, f"{path}.{name}")
File "D:\Palworld save\palworld-save-tools-windows-v0.15.0\lib\archive.py", line 265, in property
value = self.prop_value(value_type, value_struct_type, value_path)
File "D:\Palworld save\palworld-save-tools-windows-v0.15.0\lib\archive.py", line 287, in prop_value
return self.struct_value(struct_type_name, path)
File "D:\Palworld save\palworld-save-tools-windows-v0.15.0\lib\archive.py", line 339, in struct_value
return self.properties_until_end(path)
File "D:\Palworld save\palworld-save-tools-windows-v0.15.0\lib\archive.py", line 175, in properties_until_end
name = self.fstring()
File "D:\Palworld save\palworld-save-tools-windows-v0.15.0\lib\archive.py", line 120, in fstring
raise Exception(

Copy of .sav or .sav.json files

Level.zip

@cheahjs cheahjs added the corrupted-file Issue is due to a corrupted save file label Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
corrupted-file Issue is due to a corrupted save file
Projects
None yet
Development

No branches or pull requests

2 participants