cheahjs / palworld-save-tools

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

zlib.error: Error -3 while decompressing data: invalid literal/length code #109

Closed Gildraen closed 5 months ago

Gildraen commented 5 months ago

Common issues before reporting

Have you modified the save files I did not, just took the file from the server

Have you tried the latest release I have the v0.16 tried on v0.15 too

Describe the bug python convert.py ..\..\serv\BU_saves\2024_01_26_7pm\E34AD9AFCE4B463AA57F484FFAEBAB44\Level.sav Converting ..\..\serv\BU_saves\2024_01_26_7pm\E34AD9AFCE4B463AA57F484FFAEBAB44\Level.sav to JSON, saving to ..\..\serv\BU_saves\2024_01_26_7pm\E34AD9AFCE4B463AA57F484FFAEBAB44\Level.sav.json Decompressing sav file Traceback (most recent call last): File "D:\Documents\Palworld\toolsave\palworld-save-tools-windows-v0.15.0\convert.py", line 115, in <module> main() File "D:\Documents\Palworld\toolsave\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:\Documents\Palworld\toolsave\palworld-save-tools-windows-v0.15.0\convert.py", line 72, in convert_sav_to_json raw_gvas, _ = decompress_sav_to_gvas(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Documents\Palworld\toolsave\palworld-save-tools-windows-v0.15.0\lib\palsav.py", line 27, in decompress_sav_to_gvas uncompressed_data = zlib.decompress(data[12:]) ^^^^^^^^^^^^^^^^^^^^^^^^^^ zlib.error: Error -3 while decompressing data: invalid literal/length code

Copy of .sav or .sav.json files

Level.zip

cheahjs commented 5 months ago

I want to say it might be corrupted, taking the save files while the server is running tends to lead to data corruption if the server is in the middle of saving when the files are taken.

Gildraen commented 5 months ago

Good guess, i tried with another sav file and it worked ! So you can add it on your requirements : make sure to stop the serv or the save might be corrupted ^^ Thank you !