[go: up one dir, main page]

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

Exception: Unknown type: ByteProperty (.SaveParameter.Level) #191

Open
nbcraft opened this issue Sep 25, 2024 · 15 comments
Open

Exception: Unknown type: ByteProperty (.SaveParameter.Level) #191

nbcraft opened this issue Sep 25, 2024 · 15 comments

Comments

@nbcraft
Copy link
nbcraft commented Sep 25, 2024

I'm not able to load up my Level.sav file, haven't seen a similar exception in the open issues, so opening this one.
This save file comes from a G-Portal server that I'm trying to use locally.

Appreciate any help 🙏

Windows 10 - PowerShell
Python 3.10
palworld-save-tools 0.23.1

Stack trace:

PS C:\Users\[user]\workspace\palworld-host-save-fix> python gui.py
Path not found - C:\Users\<user>\AppData\Local\PySimpleGUI\settings
folder_path
Converting C:/Users/<user>/AppData/Local/Pal/Saved/SaveGames/<some_id>/C839DAFD487AB411509B2CA449F6219D/Level.sav to JSON, saving to C:/Users/<user>/AppData/Local/Pal/Saved/SaveGames/<some_id>/C839DAFD487AB411509B2CA449F6219D/Level.sav.json
Decompressing sav file
Loading GVAS file
Traceback (most recent call last):
  File "C:\Users\<user>\workspace\palworld-host-save-fix\gui.py", line 129, in <module>
    main()
  File "C:\Users\<user>\workspace\palworld-host-save-fix\gui.py", line 67, in main
    sav_to_json(level_sav_path, level_json_path)
  File "C:\Users\<user>\workspace\palworld-host-save-fix\fix_host_save.py", line 177, in sav_to_json
    convert_sav_to_json(file, output_path, True)
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\commands\convert.py", line 94, in convert_sav_to_json
    gvas_file = GvasFile.read(
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\gvas.py", line 131, in read
    gvas_file.properties = reader.properties_until_end()
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\archive.py", line 273, in properties_until_end
    properties[name] = self.property(type_name, size, f"{path}.{name}")
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\archive.py", line 286, in property
    value = self.struct(path)
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\archive.py", line 397, in struct
    value = self.struct_value(struct_type, path)
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\archive.py", line 424, in struct_value
    return self.properties_until_end(path)
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\archive.py", line 273, in properties_until_end
    properties[name] = self.property(type_name, size, f"{path}.{name}")
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\archive.py", line 359, in property
    value = self.prop_value(value_type, value_struct_type, value_path)
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\archive.py", line 381, in prop_value
    return self.struct_value(struct_type_name, path)
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\archive.py", line 424, in struct_value
    return self.properties_until_end(path)
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\archive.py", line 273, in properties_until_end
    properties[name] = self.property(type_name, size, f"{path}.{name}")
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\archive.py", line 283, in property
    value = self.custom_properties[path][0](self, type_name, size, path)
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\rawdata\character.py", line 13, in decode
    value["value"] = decode_bytes(reader, char_bytes)
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\rawdata\character.py", line 22, in decode_bytes
    "object": reader.properties_until_end(),
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\archive.py", line 273, in properties_until_end
    properties[name] = self.property(type_name, size, f"{path}.{name}")
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\archive.py", line 286, in property
    value = self.struct(path)
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\archive.py", line 397, in struct
    value = self.struct_value(struct_type, path)
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\archive.py", line 424, in struct_value
    return self.properties_until_end(path)
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\archive.py", line 273, in properties_until_end
    properties[name] = self.property(type_name, size, f"{path}.{name}")
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\archive.py", line 375, in property
    raise Exception(f"Unknown type: {type_name} ({path})")
Exception: Unknown type: ByteProperty (.SaveParameter.Level)
@UneasyBonney
Copy link

I'm having the same issue with jannikBirn's version as well. Must be from a palworld update?

@nbcraft
Copy link
Author
nbcraft commented Sep 25, 2024

Yes I guess so.

I loaded an older backup save file (from August 7th) without loading it into Palworld first, and it seems to go further in the loading/converting but I get Exception: Warning: EOF not reached for that one (which has been raised in #189 and #190 already).

And there's virtually no difference between those two save files, I haven't played (apart from loading the game) since then after completing all Steam achievements. I'm just trying to turn off our dedicated server and move to a local save file instead.

Stack trace for the older save file:

PS C:\Users\<user>\workspace\palworld-host-save-fix> python gui.py
folder_path
Converting C:/Users/Nate/AppData/Local/Pal/Saved/SaveGames/<some_id>/C839DAFD487AB411509B2CA449F6219D/Level.sav to JSON, saving to C:/Users/Nate/AppData/Local/Pal/Saved/SaveGames/<some_id>/C839DAFD487AB411509B2CA449F6219D/Level.sav.json
Decompressing sav file
Loading GVAS file
Traceback (most recent call last):
  File "C:\Users\<user>\workspace\palworld-host-save-fix\gui.py", line 129, in <module>
    main()
  File "C:\Users\<user>\workspace\palworld-host-save-fix\gui.py", line 67, in main
    sav_to_json(level_sav_path, level_json_path)
  File "C:\Users\<user>\workspace\palworld-host-save-fix\fix_host_save.py", line 177, in sav_to_json
    convert_sav_to_json(file, output_path, True)
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\commands\convert.py", line 118, in convert_sav_to_json
    gvas_file = GvasFile.read(
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\gvas.py", line 131, in read
    gvas_file.properties = reader.properties_until_end()
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\archive.py", line 386, in properties_until_end
    properties[name] = self.property(type_name, size, f"{path}.{name}")
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\archive.py", line 399, in property
    value = self.struct(path)
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\archive.py", line 515, in struct
    value = self.struct_value(struct_type, path)
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\archive.py", line 542, in struct_value
    return self.properties_until_end(path)
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\archive.py", line 386, in properties_until_end
    properties[name] = self.property(type_name, size, f"{path}.{name}")
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\archive.py", line 396, in property
    value = self.custom_properties[path][0](self, type_name, size, path)
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\rawdata\map_object.py", line 21, in decode
    map_object["Model"]["value"]["RawData"]["value"] = map_model.decode_bytes(
  File "C:\Users\<user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\palworld_save_tools\rawdata\map_model.py", line 42, in decode_bytes
    raise Exception("Warning: EOF not reached")
Exception: Warning: EOF not reached

@VRonin361
Copy link

There seems to be a fix for that here in this comment but i dont know how to update xNul's tool. Maybe someone can help

@nbcraft
Copy link
Author
nbcraft commented Sep 27, 2024

There seems to be a fix for that here in this comment but i dont know how to update xNul's tool. Maybe someone can help

Nice, okay, I replaced both archive.py and item_container_slots.py files in my palworld-save-tools local pip install, and that fixed the Exception: Unknown type: ByteProperty (.SaveParameter.Level) issue.

But now I'm back on the Warning: EOF not reached error from the older save, but with the newer save, so... back to square one-ish.

@VRonin361
Copy link

This Tool worked flawlessly for me! (Only thing i did different than it is written in the fix_host_save_readme.txt is that i had to create a new folder named LocalWorldSave in .\PalWorldSaveTools-0.8.1\

@nbcraft
Copy link
Author
nbcraft commented Sep 28, 2024

This Tool worked flawlessly for me! (Only thing i did different than it is written in the fix_host_save_readme.txt is that i had to create a new folder named LocalWorldSave in .\PalWorldSaveTools-0.8.1\

Thanks for the suggestion, but no dice for me, got hit with the ModuleNotFoundError: No module named 'cityhash' error.
And following the instructions to install C++ build tools and running clean_up.cmd didn't fix the issue.

@VRonin361
Copy link

If you want you can send me your Players and Level.sav file and tell me which Player File is the old and the new one so i can do it for you

@VRonin361
Copy link

Steps i did was install C++ build and tools like it is described in the description. Then copy players and level.sav into the LocalWorldSave folder and then run the fix_host_save.cmd, then copy the LocalWorldSave files onto my server. Make sure you have python 3 newest version installed

@VRonin361
Copy link

But let me tell you the rubberbanding of the dedicated server is insane. There is no fix for it yet thats working for me. It rubberbands any dashing ability and also the AI from the pals outside of the base are very slow and buggy and sometimes rubberband aswell, even to the point of teleporting. I have good specs and experienced these issues even when im the only one connected to the server. In my opinion its not worth it

@deafdudecomputers
Copy link

This Tool worked flawlessly for me! (Only thing i did different than it is written in the fix_host_save_readme.txt is that i had to create a new folder named LocalWorldSave in .\PalWorldSaveTools-0.8.1\

Thanks for the suggestion, but no dice for me, got hit with the ModuleNotFoundError: No module named 'cityhash' error. And following the instructions to install C++ build tools and running clean_up.cmd didn't fix the issue.

This is because some computers, for some reason, didn't install pip itself when they install python. The few recent updates has helped alleviate this issue. It'll now ensure to install pip package for python, then proceed to install the required packages for my tool to run properly into my external_libs folder. I apologize for the cityhash error. Hopefully it's working for you. Someone else had this issue, and I released v0.8.3 patch and they said it's fixed.

Kindly give it another try, and let me know. Thank you.

@kadardar
Copy link
kadardar commented Oct 12, 2024

But let me tell you the rubberbanding of the dedicated server is insane. There is no fix for it yet thats working for me. It rubberbands any dashing ability and also the AI from the pals outside of the base are very slow and buggy and sometimes rubberband aswell, even to the point of teleporting. I have good specs and experienced these issues even when im the only one connected to the server. In my opinion its not worth it

Is that dedicated servers in general or after the save import? I never tested it without an import but i experience rubberbanding aswell

@kadardar
Copy link

Also experiencing this issue.

Same if i run
python fix_host_save.py "C:\Users\<user>\Desktop\palworld\5E60FD164E83B4DDA60C74B0B5C547E1" 00F04E85000000000000000000000000 00000000000000000000000000000001 True

@JaviDaBomb
Copy link

If you want you can send me your Players and Level.sav file and tell me which Player File is the old and the new one so i can do it for you

Is there any way you would do this for me?

@nbcraft
Copy link
Author
nbcraft commented Oct 31, 2024

@VRonin361 thanks for offering to help, I was able to run the latest version of https://github.com/deafdudecomputers/PalWorldSaveTools today, but then experienced crashes in-game, I'm moving this topic to an issue in the proper repo: deafdudecomputers/PalWorldSaveTools#19

As for this tool (xNul/palworld-host-save-fix), I guess we're still stuck on Exception: Warning: EOF not reached for now.

@nbcraft
Copy link
Author
nbcraft commented Nov 2, 2024

I think this specific issue could be closed, either now, or once the fix/workaround in #191 (comment) is implemented with this tool. I'll leave it to a maintainer's discretion.

As for the the Exception: Warning: EOF not reached issue, that one is already submitted under #189 and #190.

Also I figured out the problem I had when using that tool: deafdudecomputers/PalWorldSaveTools
And it was having Private-locks enabled on some chests.
The workaround was to disable those locks in the origin world, and then run the migration process, and re-enabling locks once the migration has been completed. See deafdudecomputers/PalWorldSaveTools#19 (comment)

Maybe those EOF errors stems from the same use-case, I won't testing that out with this repository's tool, just a lead for whoever might be looking into this.
Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants