astronomy-commons/hats-import

split_pixels throws an error on empty files

Closed this issue · 0 comments

Bug report

If some input files are present but empty, the mapping stage succeeds, but the splitting stage can fail when freeing memory that wasn't allocated.

Only free (call del) inside the loop to read over files.

Before submitting
Please check the following:

  • [z] I have described the situation in which the bug arose, including what code was executed, information about my environment, and any applicable data others will need to reproduce the problem.
  • I have included available evidence of the unexpected behavior (including error messages, screenshots, and/or plots) as well as a descriprion of what I expected instead.
  • If I have a solution in mind, I have provided an explanation and/or pseudocode and/or task list.