Repository navigation
ROB: Do not crash when the page labels are not a dictionary - #4022
Merged
stefan6419846 merged 2 commits intoAug 27, 2026
Merged
Conversation
stefan6419846
requested changes
Aug 26, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4022 +/- ##
=======================================
Coverage 98.00% 98.00%
=======================================
Files 57 57
Lines 11136 11139 +3
Branches 2090 2091 +1
=======================================
+ Hits 10914 10917 +3
Misses 124 124
Partials 98 98 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
index2label casts /PageLabels to a DictionaryObject and tests membership on the result, so a file where that entry holds a number, a string or an array raised 'TypeError: argument of type NumberObject is not iterable' from reader.page_labels. The function already falls back to the page position when /PageLabels is absent, so an entry it cannot read is reported and takes the same path.
RavSinghChandan
force-pushed
the
page-labels-not-a-dictionary
branch
from
August 27, 2026 02:35
7d53683 to
44f4674
Compare
Contributor
Author
|
Added the IDs. |
stefan6419846
approved these changes
Aug 27, 2026
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.
index2labelcasts/PageLabelsto aDictionaryObjectand tests membership on the result:The function already falls back to the page position when
/PageLabelsis absent, so an entry it cannot read is reported and takes the same path.Reverting the change fails the three new tests