cheahjs / palworld-save-tools

Tools for converting Palworld .sav files to JSON and back
MIT License
791 stars 71 forks source link

Issue- Exception: Unknown type: StructProperpy #82

Open LOz1131 opened 8 months ago

LOz1131 commented 8 months ago

While converting a GamePass save to try and recover the world 12A4D2D47E854BB5A8D79C30AF39F4F4.zip I have received this error:

C:\Users*\Downloads\palworld-save-tools-windows-v0.14.0>python convert.py C:\Users*\AppData\Local\Packages\PocketpairInc.Palworld_ad4psfrxyesvt\SystemAppData\wgs\0009000001A49C9F_0000000000000000000000006B210A9C\12A4D2D47E854BB5A8D79C30AF39F4F4\CF297DAB23DC4281826BE15120429940 --to-json Converting C:\Users*\AppData\Local\Packages\PocketpairInc.Palworld_ad4psfrxyesvt\SystemAppData\wgs\0009000001A49C9F_0000000000000000000000006B210A9C\12A4D2D47E854BB5A8D79C30AF39F4F4\CF297DAB23DC4281826BE15120429940 to JSON, saving to C:\Users*\AppData\Local\Packages\PocketpairInc.Palworld_ad4psfrxyesvt\SystemAppData\wgs\0009000001A49C9F_0000000000000000000000006B210A9C\12A4D2D47E854BB5A8D79C30AF39F4F4\CF297DAB23DC4281826BE15120429940.json Decompressing sav file Loading GVAS file Traceback (most recent call last): File "C:\Users*\Downloads\palworld-save-tools-windows-v0.14.0\convert.py", line 115, in main() File "C:\Users*\Downloads\palworld-save-tools-windows-v0.14.0\convert.py", line 53, in main convert_sav_to_json(args.filename, output_path, args.minify_json) File "C:\Users*\Downloads\palworld-save-tools-windows-v0.14.0\convert.py", line 74, in convert_sav_to_json gvas_file = GvasFile.read(raw_gvas, PALWORLD_TYPE_HINTS, PALWORLD_CUSTOM_PROPERTIES) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users*\Downloads\palworld-save-tools-windows-v0.14.0\lib\gvas.py", line 125, in read gvas_file.properties = reader.properties_until_end() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users*\Downloads\palworld-save-tools-windows-v0.14.0\lib\archive.py", line 177, in properties_until_end properties[name] = self.property(type_name, size, f"{path}.{name}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users*\Downloads\palworld-save-tools-windows-v0.14.0\lib\archive.py", line 188, in property value = self.struct(path) ^^^^^^^^^^^^^^^^^ File "C:\Users*\Downloads\palworld-save-tools-windows-v0.14.0\lib\archive.py", line 300, in struct value = self.struct_value(struct_type, path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users*\Downloads\palworld-save-tools-windows-v0.14.0\lib\archive.py", line 336, in struct_value return self.properties_until_end(path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users*\Downloads\palworld-save-tools-windows-v0.14.0\lib\archive.py", line 177, in properties_until_end properties[name] = self.property(type_name, size, f"{path}.{name}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users*\Downloads\palworld-save-tools-windows-v0.14.0\lib\archive.py", line 240, in property "value": self.array_property(array_type, size - 4, path), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users*\Downloads\palworld-save-tools-windows-v0.14.0\lib\archive.py", line 350, in array_property prop_values.append(self.struct_value(type_name, f"{path}.{prop_name}")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users*\Downloads\palworld-save-tools-windows-v0.14.0\lib\archive.py", line 336, in struct_value return self.properties_until_end(path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users*\Downloads\palworld-save-tools-windows-v0.14.0\lib\archive.py", line 177, in properties_until_end properties[name] = self.property(type_name, size, f"{path}.{name}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users*\Downloads\palworld-save-tools-windows-v0.14.0\lib\archive.py", line 188, in property value = self.struct(path) ^^^^^^^^^^^^^^^^^ File "C:\Users*\Downloads\palworld-save-tools-windows-v0.14.0\lib\archive.py", line 300, in struct value = self.struct_value(struct_type, path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users*\Downloads\palworld-save-tools-windows-v0.14.0\lib\archive.py", line 336, in struct_value return self.properties_until_end(path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users*\Downloads\palworld-save-tools-windows-v0.14.0\lib\archive.py", line 177, in properties_until_end properties[name] = self.property(type_name, size, f"{path}.{name}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users*\Downloads\palworld-save-tools-windows-v0.14.0\lib\archive.py", line 278, in property raise Exception(f"Unknown type: {type_name} ({path})")

Exception: Unknown type: StructProperpy (.worldSaveData.MapObjectSaveData.MapObjectSaveData.Model.BuildProcess)

Other save files have been successfully converted. Is there a way to force the conversion to complete so that the file can be fixed and then converted back?

Thank you

xvelezv commented 8 months ago

Did you modify the key "StructProperty" in some way? Like the error says, the name is completely wrong and it should be StructProperty with a T and not StructProperpy.

LOz1131 commented 8 months ago

Did you modify the key "StructProperty" in some way? Like the error says, the name is completely wrong and it should be StructProperty with a T and not StructProperpy.

I haven't modified the files at all. After a crash I was led here by comments that suggested converting to json and back could recover a save that won't load. I'm hoping that a single corruption of a T into a P is that the only issue with the save file.