Skip to main content
Participant
February 21, 2023
Question

Getting started with Extract API

  • February 21, 2023
  • 0 replies
  • 286 views

Not able to get started here using python vai VS Code.  Specifically I am tryignn to use the example python code found here: https://github.com/adobe/pdfservices-python-sdk-samples.  In trying to run extract_txt_from_pdf.py, I get the following  error in my terminal.  I don't even know where to begin:

 

PS C:\Users\stand\PDFExtractAPI> & C:/Users/stand/AppData/Local/Programs/Python/Python311/python.exe c:/Users/stand/PDFExtractAPI/src/extractpdf/extract_txt_table_info_from_pdf.py
C:\Users\stand\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\__init__.py:102: RequestsDependencyWarning: urllib3 (1.26.13) or chardet (5.1.0)/charset_normalizer (2.0.12) doesn't match a supported version!
warnings.warn("urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported "
Traceback (most recent call last):
File "c:\Users\stand\PDFExtractAPI\src\extractpdf\extract_txt_table_info_from_pdf.py", line 30, in <module>
.from_file(base_path + "/pdfservices-api-credentials.json") \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\stand\AppData\Local\Programs\Python\Python311\Lib\site-packages\adobe\pdfservices\operation\auth\service_account_credentials.py", line 203, in from_file
self._private_key = file_utils.read_conf_file_content(private_key_file_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\stand\AppData\Local\Programs\Python\Python311\Lib\site-packages\adobe\pdfservices\operation\internal\util\file_utils.py", line 15,
in read_conf_file_content
with open(get_file_path(file_path)) as file:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 22] Invalid argument: 'c:\\Users\\stand\\PDFExtractAPI\\<C:/Users/stan/PDFExtractAPI/pdfservices-api-credentials.json>'
PS C:\Users\stand\PDFExtractAPI>

This topic has been closed for replies.