deca icon indicating copy to clipboard operation
deca copied to clipboard

Python Error

Open ssc41 opened this issue 3 years ago • 5 comments

Trying to extract the player_skills.bin from theHunter: COTW I get this error

2021-09-04 09:26:32.279202: Exporting ../work/hp/extracted/settings/hp_settings/player_skills.bin Traceback (most recent call last): File "deca\gui\main.py", line 335, in slot_extract_clicked File "deca\gui\main.py", line 276, in extract File "deca\export_import.py", line 257, in nodes_export_processed File "deca\export_import_adf.py", line 260, in node_export_adf_text AttributeError: 'NoneType' object has no attribute 'dump_to_string'

ssc41 avatar Sep 04 '21 08:09 ssc41

Hi you can try checking the code again as it says that there is an attribute error. This can either be because there is no such attribute, there is a spelling error or you have forgotten to import the module.

elegant-armour5 avatar Sep 05 '21 00:09 elegant-armour5

I am not doing anything different than I have done before.

Deca v0.2.12 Open project by selecting exe Once imported, find the player_skills.bin entry on the gui. Select the export options and then press extract.

As you see from the error above, it writes out the bin file and nothing else. So it must be while processing the text file.

ssc41 avatar Sep 05 '21 05:09 ssc41

If you look at the code there is no protection for getting None fron the read_node in node_export_adf_text. However in node_export_adf_processed above it there is. Just need something like this after the read_node call in node_export_adf_text.

If adf is None: return

ssc41 avatar Sep 05 '21 05:09 ssc41

If you look at the code there is no protection for getting None fron the read_node in node_export_adf_text. However in node_export_adf_processed above it there is. Just need something like this after the read_node call in node_export_adf_text.

If adf is None: return

@ssc41 did you ever try fixing this yourself? I'm seeing an issue just like this trying to export the settings/hp_settings/reserve_1.bin file from CotW. But in addition to the text file error, when I just export the raw bin file without the text, it results in a bin file that isn't valid even though there are no error messages. e.g. if I copy that extracted bin file right back into the dropzone directory without changing it then CotW won't load with that bin file. And yet I have another reserve_6.bin in the dropzone that I modified just 2 weeks back that I extracted and updated without issues.

WazBurrows avatar Apr 18 '22 16:04 WazBurrows

If you look at the code there is no protection for getting None fron the read_node in node_export_adf_text. However in node_export_adf_processed above it there is. Just need something like this after the read_node call in node_export_adf_text. If adf is None: return

@ssc41 did you ever try fixing this yourself? I'm seeing an issue just like this trying to export the settings/hp_settings/reserve_1.bin file from CotW. But in addition to the text file error, when I just export the raw bin file without the text, it results in a bin file that isn't valid even though there are no error messages. e.g. if I copy that extracted bin file right back into the dropzone directory without changing it then CotW won't load with that bin file. And yet I have another reserve_6.bin in the dropzone that I modified just 2 weeks back that I extracted and updated without issues.

Honestly cannot remember what I did to fix it. I have a feeling I just deleted the project and started fresh with the latest version.

ssc41 avatar Aug 11 '22 09:08 ssc41