From 364c48edd8d2f3ea050be5e666c5807dc7346deb Mon Sep 17 00:00:00 2001 From: blitzmann Date: Mon, 16 Jan 2023 00:24:44 -0500 Subject: [PATCH] PdfFileReader -> PdfReader --- cps/uploader.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cps/uploader.py b/cps/uploader.py index ecf4868c..a456f976 100644 --- a/cps/uploader.py +++ b/cps/uploader.py @@ -37,12 +37,12 @@ except (ImportError, RuntimeError) as e: use_generic_pdf_cover = True try: - from PyPDF2 import PdfFileReader + from PyPDF2 import PdfReader use_pdf_meta = True except ImportError as ex: log.debug('PyPDF2 is recommended for best performance in metadata extracting from pdf files: %s', ex) try: - from PyPDF3 import PdfFileReader + from PyPDF3 import PdfReader use_pdf_meta = True except ImportError as e: log.debug('Cannot import PyPDF3/PyPDF2, extracting pdf metadata will not work: %s / %s', e) @@ -157,7 +157,7 @@ def pdf_meta(tmp_file_path, original_file_name, original_file_extension): if use_pdf_meta: with open(tmp_file_path, 'rb') as f: - pdf_file = PdfFileReader(f) + pdf_file = PdfReader(f) doc_info = pdf_file.getDocumentInfo() try: doc_info = pdf_file.getDocumentInfo()