xNul / palworld-host-save-fix

Fixes the bug which forces a player to create a new character when they already have a save. Useful for migrating maps from co-op to dedicated servers and from one dedicated server to another.
MIT License
887 stars 68 forks source link

ValueError: invalid literal for int() with base 16: 'ry' #120

Closed TwyxVolt closed 5 months ago

TwyxVolt commented 5 months ago

Hi all,

I'm receiving the following when I try to run the command: Traceback (most recent call last): File "C:\Users\bryan\palworld-host-save-fix-main\fix-host-save.py", line 244, in main() File "C:\Users\bryan\palworld-host-save-fix-main\fix-host-save.py", line 43, in main temp_new = str(int(new_guid[x-1] + new_guid[x], 16))+',\n' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 16: 'ry'

I ran this code: python C:\Users\bryan\palworld-host-save-fix-main\fix-host-save.py C:\Users\bryan.cargo\bin\uesave.exe C:\PalServer Recovery\29C0752C486DABF1A56C7FBA4AEDF5DF F8DBA9CB000000000000000000000000 00000000000000000000000000000001 I downloaded the dependencies needed and followed the directions for windows coop to windows server

vealmichael commented 5 months ago

I'm getting something similar

PS C:\hold\tools> python fix-host-save.py "C:\hold\tools\uesave.exe" "C:\hold\F6AF4C52424D1C0AB05F9FBEDA6E1405" C:\hold\F6AF4C52424D1C0AB05F9FBEDA6E1405\Players\09B3D2FA000000000000000000000000.sav C:\hold\F6AF4C52424D1C0AB05F9FBEDA6E1405\Players\00000000000000000000000000000001.sav WARNING: Running this script WILL change your save files and could potentially corrupt your data. It is HIGHLY recommended that you make a backup of your save folder before continuing. Press enter if you would like to continue.

Traceback (most recent call last): File "C:\hold\tools\fix-host-save.py", line 244, in main() File "C:\hold\tools\fix-host-save.py", line 42, in main temp_old = str(int(old_guid[x-1] + old_guid[x], 16))+',\n' ValueError: invalid literal for int() with base 16: 'd\'

xNul commented 5 months ago

@TwyxVolt you need to put quotes around your path like in the instructions: "C:\PalServer Recovery\29C0752C486DABF1A56C7FBA4AEDF5DF"

@vealmichael you need to put only the GUID like in the instructions: 09B3D2FA000000000000000000000000 00000000000000000000000000000001

Please pay closer attention to the instructions before opening an issue please.

vealmichael commented 5 months ago

PS C:\hold\tools> python fix-host-save.py "C:\hold\tools\uesave.exe" "C:\hold\F6AF4C52424D1C0AB05F9FBEDA6E1405" 09B3D2FA000000000000000000000000.sav 00000000000000000000000000000001.sav WARNING: Running this script WILL change your save files and could potentially corrupt your data. It is HIGHLY recommended that you make a backup of your save folder before continuing. Press enter if you would like to continue.

ERROR: Your player save does not exist. Did you enter the correct new GUID of your player? It should look like "8E910AC2000000000000000000000000". Did your player create their character with the provided save? Once they create their character, a file called "C:\hold\F6AF4C52424D1C0AB05F9FBEDA6E1405/Players/09B3D2FA000000000000000000000000.sav.sav" should appear. Look back over the steps in the README on how to get your new GUID.

@xNul I've tried it both ways. When I run it as recommended, It can't seem to find the player savs

xNul commented 5 months ago

@vealmichael again, look at the example. The example does not have .sav at the end.

vealmichael commented 5 months ago

PS C:\hold\tools> python fix-host-save.py "C:\hold\tools\uesave.exe" "C:\hold\F6AF4C52424D1C0AB05F9FBEDA6E1405" 09B3D2FA000000000000000000000000 00000000000000000000000000000001 WARNING: Running this script WILL change your save files and could potentially corrupt your data. It is HIGHLY recommended that you make a backup of your save folder before continuing. Press enter if you would like to continue.

File C:\hold\F6AF4C52424D1C0AB05F9FBEDA6E1405/Level.sav uncompressed successfully File C:\hold\F6AF4C52424D1C0AB05F9FBEDA6E1405/Level.sav (type: 50) converted to JSON successfully File C:\hold\F6AF4C52424D1C0AB05F9FBEDA6E1405/Players/00000000000000000000000000000001.sav uncompressed successfully File C:\hold\F6AF4C52424D1C0AB05F9FBEDA6E1405/Players/00000000000000000000000000000001.sav (type: 49) converted to JSON successfully Converted save files to JSON Traceback (most recent call last): File "C:\hold\tools\fix-host-save.py", line 244, in main() File "C:\hold\tools\fix-host-save.py", line 83, in main level_json = json.load(f) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64qbz5n2kfra8p0\lib\json\init.py", line 293, in load return loads(fp.read(), File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64qbz5n2kfra8p0\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] MemoryError

I probably screwed it up again. What did I do wrong?

xNul commented 5 months ago

@vealmichael actually, you didn't! But it looks like your computer doesn't have enough RAM to run the script :( You can try using a more powerful computer, one with more RAM though.

vealmichael commented 5 months ago

64gbs of ram not enough?? oh crap

vealmichael commented 5 months ago

@xNul Thanks for all the help! I rebooted my computer and ran it again and It worked! I'll move the files to my EC2 instance and see if it comes up. Thanks for doing the lords work!

xNul commented 5 months ago

@vealmichael glad I could help!