Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

preview is smaller than the padded data

Open
#548 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
data

Research direction

Start with httomo/runner/task_runner.py at _execute_section and httomo/runner/block_split.py at BlockSplitter.init, then reproduce the case where the requested preview is smaller than the padded data. Done should mean this input no longer causes a ZeroDivisionError; the intended preview and splitting behavior still needs clarification.

Written by the indexing model from the issue text.

Description

bug

When the requested previewed data is smaller than the padded data, it results in the error in BlockSplitter:

  File "/home/algol/Documents/DEV/httomo/httomo/runner/task_runner.py", line 112, in _execute_section
    splitter = BlockSplitter(self.source, section.max_slices)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/algol/Documents/DEV/httomo/httomo/runner/block_split.py", line 27, in __init__
    self._num_blocks = math.ceil(self._chunk_size / self._max_slices)
                                 ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
ZeroDivisionError: division by zero
Dominant language
Python
Stars
10
Forks
5
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DiamondLightSource/httomo

All issues in DiamondLightSource/httomo

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.