set_page_label fails due to page_labels missing /Nums key #3397
evilpythonist
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
While trying to relabel pages in a pdf so that they agree with its contents I encountered a KeyError (see code and traceback below). I found a workaround (also see below).
I didn't file a bug report because I can't provide the pdf file. Still I wanted to share my workaround in case someone else encounters this issue.
Environment
Code
Traceback
This is the complete traceback I see:
Workaround
I got it to work by replacing
with
Beta Was this translation helpful? Give feedback.
All reactions