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

Error when converting: Exception: Warning: EOF not reached #177

Open
WombatGTS opened this issue Jun 28, 2024 · 3 comments
Open

Error when converting: Exception: Warning: EOF not reached #177

WombatGTS opened this issue Jun 28, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@WombatGTS
Copy link

Common issues before reporting
No

Have you modified the save files
No

If you have, please ensure that the JSON files are valid.
couldn't get the JSON file step

Have you tried the latest release
Yes

Please download the palworld-save-tools-windows.zip file from releases in case it's been fixed.
Yes

Describe the bug
A clear and concise description of what the bug is.

Cannot convert file, please see below:

Checking if Python is installed as python3
INFO: Could not find files for the given pattern(s).
Checking if Python is installed as python
INFO: Could not find files for the given pattern(s).
Checking if Python is installed as py
C:\Users\gotht\AppData\Local\Programs\Python\Launcher\py.exe
Found Python at py
Python version:
Python 3.12.4
Converting C:\Users\gotht\AppData\Local\Pal\Saved\SaveGames\76561198055340019\07913EE1455521B1F643439732A0AB45\Level.sav to JSON, saving to C:\Users\gotht\AppData\Local\Pal\Saved\SaveGames\76561198055340019\07913EE1455521B1F643439732A0AB45\Level.sav.json
Decompressing sav file
Loading GVAS file
Traceback (most recent call last):
File "C:\Users\gotht\Downloads\palworld-save-tools-windows-v0.22.0\convert.py", line 160, in
main()
File "C:\Users\gotht\Downloads\palworld-save-tools-windows-v0.22.0\convert.py", line 71, in main
convert_sav_to_json(
File "C:\Users\gotht\Downloads\palworld-save-tools-windows-v0.22.0\convert.py", line 114, in convert_sav_to_json
gvas_file = GvasFile.read(
^^^^^^^^^^^^^^
File "C:\Users\gotht\Downloads\palworld-save-tools-windows-v0.22.0\palworld_save_tools\gvas.py", line 131, in read
gvas_file.properties = reader.properties_until_end()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gotht\Downloads\palworld-save-tools-windows-v0.22.0\palworld_save_tools\archive.py", line 386, in properties_until_end
properties[name] = self.property(type_name, size, f"{path}.{name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gotht\Downloads\palworld-save-tools-windows-v0.22.0\palworld_save_tools\archive.py", line 399, in property
value = self.struct(path)
^^^^^^^^^^^^^^^^^
File "C:\Users\gotht\Downloads\palworld-save-tools-windows-v0.22.0\palworld_save_tools\archive.py", line 510, in struct
value = self.struct_value(struct_type, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gotht\Downloads\palworld-save-tools-windows-v0.22.0\palworld_save_tools\archive.py", line 537, in struct_value
return self.properties_until_end(path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gotht\Downloads\palworld-save-tools-windows-v0.22.0\palworld_save_tools\archive.py", line 386, in properties_until_end
properties[name] = self.property(type_name, size, f"{path}.{name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gotht\Downloads\palworld-save-tools-windows-v0.22.0\palworld_save_tools\archive.py", line 396, in property
value = self.custom_properties[path][0](self, type_name, size, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gotht\Downloads\palworld-save-tools-windows-v0.22.0\palworld_save_tools\rawdata\map_object.py", line 21, in decode
map_object["Model"]["value"]["RawData"]["value"] = map_model.decode_bytes(
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gotht\Downloads\palworld-save-tools-windows-v0.22.0\palworld_save_tools\rawdata\map_model.py", line 42, in decode_bytes
raise Exception("Warning: EOF not reached")
Exception: Warning: EOF not reached
Press any key to continue . . .

Copy of .sav or .sav.json files
If possible, attach the .sav or .sav.json file. Add to a zip file to compress it down from gigabytes down to megabytes to make it manageable.

Level file.zip

@cheahjs cheahjs added the bug Something isn't working label Jun 28, 2024
@withinvortex
Copy link

got the same issues

@WingsofStars
Copy link

I have the same issue, and I could provide 30+ level test save if you need it.

@Dennijr
Copy link

Dennijr commented Sep 6, 2024

i was having this same problem but have hacked my way to a workaround for anyone curious.

DISCLAIMER: ive been programming professionally for over a decade but have never used python before, barely used git before, and have no idea how to legitimately find out what is necessary for reading and writing palworld files
USE AT OWN RISK, as always

start by cloning the repo

fix map_model.py
-change data["created_at"] = reader.i64() to data["created_at"] = reader.guid() (around line 40)
-change writer.i64(p["created_at"]) to writer.guid(p["created_at"]) (around line 80)

fix map_concrete_model.py
-remove "PalMapObjectItemChestModel", and "PalMapObjectItemChest_AffectCorruption", from NO_OP_TYPES (around lines 331 and 342)
-add this to the end of the elif block around line 445

    elif map_object_concrete_model == "PalMapObjectItemChestModel":
        data["chest_id"] = reader.guid()
    elif map_object_concrete_model == "PalMapObjectItemChest_AffectCorruption":
        data["cooler_id"] = reader.guid()

-add this to the end of the elif block around line 538

    elif map_object_concrete_model == "PalMapObjectItemChestModel":
        writer.guid(p["chest_id"])
    elif map_object_concrete_model == "PalMapObjectItemChest_AffectCorruption":
        writer.guid(p["cooler_id"])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants