Skip to content

Commit

Permalink
Merge pull request #6 from emcniece/fix/extract-text
Browse files Browse the repository at this point in the history
Fix/extract text
  • Loading branch information
emcniece authored May 9, 2023
2 parents 253ad7e + ba8ecc3 commit d9f5010
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"documentation": "/~https://github.com/emcniece/ha_pdf",
"requirements": ["PyPDF2~=3.0.0"],
"codeowners": ["@emcniece"],
"version": "1.1.1"
"version": "1.1.2"
}
2 changes: 1 addition & 1 deletion sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def update(self):
page = pdf.pages[int(self._pdf_page)]
except IndexError:
_LOGGER.error("PDF Page %s does not exist in file: %s", self._pdf_page, self._file_path)
text = page.extractText()
text = page.extract_text()
except (IndexError, FileNotFoundError, IsADirectoryError, UnboundLocalError):
_LOGGER.warning(
"File or data not present at the moment: %s",
Expand Down

0 comments on commit d9f5010

Please sign in to comment.