You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to load a document, which is not a PDF, load_from_file succeeds, but all subsequent methods crash. The reason is that self._document becomes None and most subsequent methods are decorated with @ensure_unlocked, leading to a call of self._document.is_locked.
I am willing to fix it, but which solution do you prefer? We can add an is_broken method, which can be used after loading the document to check if it was loaded successfully. Or we can make loading throw an exception upon failure.
The text was updated successfully, but these errors were encountered:
When I try to load a document, which is not a PDF,
load_from_file
succeeds, but all subsequent methods crash. The reason is thatself._document
becomesNone
and most subsequent methods are decorated with@ensure_unlocked
, leading to a call ofself._document.is_locked
.I am willing to fix it, but which solution do you prefer? We can add an
is_broken
method, which can be used after loading the document to check if it was loaded successfully. Or we can make loading throw an exception upon failure.The text was updated successfully, but these errors were encountered: