kartoffels123 / ffxiv-tex-converter

MIT License
0 stars 1 forks source link

UnboundLocalError: cannot access local variable 'block_size' where it is not associated with a value #1

Closed ob2code closed 1 month ago

ob2code commented 1 month ago

Error occurs when I run coverting command from tex to dds. Help me check with the attached file. Thanks.

centaurmtpro.zip

Traceback (most recent call last): File "D:\tmp\ffxiv-tex-converter-master\ffxiv_tex_converter.py", line 54, in handler.solo_process(grabber, function) File "D:\tmp\ffxiv-tex-converter-master\src\packageland\handler.py", line 45, in solo_process list(map(function, tqdm(items))) File "D:\tmp\ffxiv-tex-converter-master\ffxiv_tex_converter.py", line 43, in do_the_thing_tex_to_dds tex_to_dds.write_dds_file(str(path), str(out_path)) File "D:\tmp\ffxiv-tex-converter-master\src\converters\tex_to_dds.py", line 235, in write_dds_file dds_binary = get_dds_binary(input_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\tmp\ffxiv-tex-converter-master\src\converters\tex_to_dds.py", line 212, in get_dds_binary pitch = get_pitch(tex_binary) ^^^^^^^^^^^^^^^^^^^^^ File "D:\tmp\ffxiv-tex-converter-master\src\converters\tex_to_dds.py", line 129, in get_pitch pitch = max(1, (width / 4)) max(1, (height / 4)) block_size ^^^^^^^^^^ UnboundLocalError: cannot access local variable 'block_size' where it is not associated with a value

kartoffels123 commented 1 month ago

I'll give the file a look in a little bit, looks like it might be an unsupported type.

kartoffels123 commented 1 month ago

Are you sure this is a valid texture? I am getting type and format mismatch and then the width and height are 1 by 1. image regardless, I would recommend omitting this from your work as its 1x1 (single pixel).

kartoffels123 commented 1 month ago

given there is no further comment I am closing this issue, feel free to make another report if you find an issue.