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

[CRASH] NoneType object is not subscriptable #17

Open
EliteMasterEric opened this issue Nov 3, 2021 · 1 comment
Open

[CRASH] NoneType object is not subscriptable #17

EliteMasterEric opened this issue Nov 3, 2021 · 1 comment

Comments

@EliteMasterEric
Copy link

Traceback (most recent call last):
  File "D:\Programming\Game Modding\Friday Night Funkin\Spritesheets\FnF-Spritesheet-and-XML-Maker\src\xmlpngUI.py", line 306, in generate_xml
    statuscode, errmsg = xmlpngengine.make_png_xml(
  File "D:\Programming\Game Modding\Friday Night Funkin\Spritesheets\FnF-Spritesheet-and-XML-Maker\src\xmlpngengine.py", line 166, in make_png_xml
    final_img_width, final_img_height, max_heights = calculate_final_size(existing_img_dict, imlist, num_cols, clip, reuse_sprites_level)
  File "D:\Programming\Game Modding\Friday Night Funkin\Spritesheets\FnF-Spritesheet-and-XML-Maker\src\xmlpngengine.py", line 99, in calculate_final_size
    widths.append(box[2] - box[0] + 4)
TypeError: 'NoneType' object is not subscriptable
@EliteMasterEric
Copy link
Author

I've determined the cause of the issue. If the frame contains no pixels (as an example, the animation from the Tricky Mod where Expurgation Tricky enters has several empty frames at the start), box will be null.

I'll make a pull request for this myself since it shouldn't be too hard.

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

1 participant