palworld-save-tools icon indicating copy to clipboard operation
palworld-save-tools copied to clipboard

zlib.error: Error -3 while decompressing data: invalid block type

Open geocine opened this issue 1 year ago • 4 comments

Have you modified the save files No, I am using the latest version of the game 1.3.1, the save file loads on my server and am able to play with friends . So I don't think this is corrupted .

Have you tried the latest release Yes v0.14.0

Describe the bug I get an issue in version 0.14.0

Python version:
Python 3.11.3
Converting C:\Users\geoci\Downloads\palworld-save-tools-windows-v0.14.0\Level.sav to JSON, saving to C:\Users\geoci\Downloads\palworld-save-tools-windows-v0.14.0\Level.sav.json
Decompressing sav file
Traceback (most recent call last):
  File "C:\Users\geoci\Downloads\palworld-save-tools-windows-v0.14.0\convert.py", line 115, in <module>
    main()
  File "C:\Users\geoci\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\geoci\Downloads\palworld-save-tools-windows-v0.14.0\convert.py", line 72, in convert_sav_to_json
    raw_gvas, _ = decompress_sav_to_gvas(data)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\geoci\Downloads\palworld-save-tools-windows-v0.14.0\lib\palsav.py", line 25, in decompress_sav_to_gvas
    uncompressed_data = zlib.decompress(data[12:])

Copy of .sav or .sav.json files https://file.io/CDoraKiguWAz

geocine avatar Jan 29 '24 12:01 geocine

Hmm, validated that https://github.com/madler/pigz is able the decompress the file and it parses fine once that's done.

Python's zlib module and zlib.js both throw errors.

cheahjs avatar Jan 29 '24 15:01 cheahjs

Heya, I've got the same issue.

Have you tried the latest release Yes v0.14.0

Have you modified the save files No

Describe the bug

Found Python at python3
Python version:
Python 3.12.1
Converting E:\backup\backup pal\74ABC76C000000000000000000000000.sav to JSON, saving to E:\backup\backup pal\74ABC76C000000000000000000000000.sav.json
Decompressing sav file
Traceback (most recent call last):
  File "C:\Users\Kabilan\Downloads\palworld-save-tools-windows-v0.14.0\convert.py", line 115, in <module>
    main()
  File "C:\Users\Kabilan\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\Kabilan\Downloads\palworld-save-tools-windows-v0.14.0\convert.py", line 72, in convert_sav_to_json
    raw_gvas, _ = decompress_sav_to_gvas(data)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Kabilan\Downloads\palworld-save-tools-windows-v0.14.0\lib\palsav.py", line 11, in decompress_sav_to_gvas
    raise Exception(
Exception: not a compressed Palworld save, found b'\x00\x00\x00' instead of P1Z
Press any key to continue . . .

Save file in question: https://file.io/zQeNeEq2rL1n

Kabug avatar Jan 29 '24 18:01 Kabug

@geocine Did you close the server before exporting? The .sav file might not be complete if the server is still running.

WayneFerdon avatar Feb 02 '24 20:02 WayneFerdon

@geocine Did you close the server before exporting? The .sav file might not be complete if the server is still running.

I copied the server file unto a different folder before exporting. I also copied that same file back to the server and it was working. As @cheahjs commented , my file is valid and not corrupted.

geocine avatar Feb 05 '24 03:02 geocine