AnthonyMichaelTDM / DRG-Save-Editor

Rock and stone!
GNU General Public License v3.0
115 stars 17 forks source link

[BUG] Save file opening error #82

Closed MujiLand closed 4 months ago

MujiLand commented 4 months ago

Describe the bug The editor opens fine. Upon opening a sav file, it creates a backup .old file, but no content is revealed in the editor. I tried the compiled release and the source code from github with requirements installed and venv creation. When I run the editor via powershell, it does throw an error. I've copied it into context section below.

Thank you very much for looking into this and for working on the editor.

To Reproduce Steps to reproduce the behavior:

  1. Open up editor with exe release or powershell main.py via venv.
  2. Open up a sav file.

Expected behavior I've used earlier version of this editor in the past and it worked great. I open up the editor and then open up the sav file and editable content will be revealed.

Save File 76561198836202614_Player.zip

Desktop (please complete the following information):

Additional context Here is the error from Powershell upon opening a sav file.

Traceback (most recent call last): File "C:\users\xxxxx\desktop\DRG-Save-Editor-1.9.0\src\main\python\main.py", line 245, in open_file stats = init_values(save_data) File "C:\users\xxxxx\desktop\DRG-Save-Editor-1.9.0\src\main\python\main.py", line 1163, in init_values stats["weapons"] = get_weapons(save_data) File "C:\users\xxxxx\desktop\DRG-Save-Editor-1.9.0\src\main\python\main.py", line 569, in get_weapons while save_data[weapon : weapon + 8].decode() == "WeaponID": UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa5 in position 0: invalid start byte

Checklist

MujiLand commented 4 months ago

Sorry, after I starting and finishing a mission in season 5, there were no more errors. You can go ahead and close this.