unable to run python code

New Here ,
Mar 05, 2022 Mar 05, 2022

Copy link to clipboard

Copied

Hi I am unanle to run python code in pycharm for pdf extractor api i am getting this error

shashidhar@MacBook-Air PDFServicesSDK-Python % python adobe-dc-pdf-services-sdk-extract-python-samples/src/extractpdf/extract_txt_from_pdf.py
File "adobe-dc-pdf-services-sdk-extract-python-samples/src/extractpdf/extract_txt_from_pdf.py", line 25
extract_pdf_options: ExtractPDFOptions = ExtractPDFOptions.builder() \
^
SyntaxError: invalid syntax
(base) shashidhar@MacBook-Air PDFServicesSDK-Python % python adobe-dc-pdf-services-sdk-extract-python-samples/src/extractpdf/extract_txt_from_pdf_with_in_memory_auth_credentials.py
File "adobe-dc-pdf-services-sdk-extract-python-samples/src/extractpdf/extract_txt_from_pdf_with_in_memory_auth_credentials.py", line 47
extract_pdf_options: ExtractPDFOptions = ExtractPDFOptions.builder() \
^
SyntaxError: invalid syntax
(base) shashidhar@MacBook-Air PDFServicesSDK-Python % python /adobe-dc-pdf-services-sdk-extract-python-samples/src/extractpdf/extract_txt_from_pdf.py
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file '/adobe-dc-pdf-services-sdk-extract-python-samples/src/extractpdf/extract_txt_from_pdf.py': [Errno 2] No such file or directory
(base) shashidhar@MacBook-Air PDFServicesSDK-Python % python /adobe-dc-pdf-services-sdk-extract-python-samples/src/extractpdf/extract_txt_from_pdf.py
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file '/adobe-dc-pdf-services-sdk-extract-python-samples/src/extractpdf/extract_txt_from_pdf.py': [Errno 2] No such file or directory
(base) shashidhar@MacBook-Air PDFServicesSDK-Python % python adobe-dc-pdf-services-sdk-extract-python-samples/src/extractpdf/extract_txt_from_pdf.py
Traceback (most recent call last):
File "adobe-dc-pdf-services-sdk-extract-python-samples/src/extractpdf/extract_txt_from_pdf.py", line 5, in <module>
logging.basicConfig(level=os.environ.get("LOGLEVEL", "INFO"))
NameError: name 'logging' is not defined

 

Please help in this regard

Views

40

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources