Repository navigation
Conversation
When a card or wallet is wider (or taller) than the printable page, layout_components computed 0 components per page, and page_xy divided by zero. Lay out at least 1 component per page in each direction instead; the component simply overflows the page margins. See pjkundert#10 (the error reported with --paper a4 and the wider half-, third- and quarter-letter formats).
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a card or Paper Wallet is wider (or taller) than the printable page,
layout_componentscomputed 0 components per page, andpage_xythen divided by zero.This lays out at least 1 component per page in each direction instead; the component simply overflows the page margins. It's the failure behind #10 (
--paper a4with the wider half-, third- and quarter-letter formats): your fix for the sizes removed the common cause, and this removes the crash for any other oversized component.slip39/layout/components.py, 2 lines (max( 1, ... )).test_layout_components_oversizeinslip39/output_test.py; it fails with the ZeroDivisionError on currentmasterand passes with this change.pytest(without the invoice/communications tests, which need optional packages): 42 passed, 4 skipped;recovery_test.py::test_dft_smokefails on Python 3.14 when numpy isn't installed (the pure-Pythonidftfallback), with or without this change.