Skip to main content
Participating Frequently
July 26, 2021
Question

Python IDE freezing when executing ExtractPDFOperation

  • July 26, 2021
  • 3 replies
  • 692 views

I'm trying to extract tables from a PDF with the PDF Services API, but when I execute the ExtractPDFOperation (which is not at all unusally set up so far as I can see) I get the error message:

ERROR: adove.pdfservices.operation.internal.api.cpf_api:Failed in parsing Extract Result

Traceback (most recent call last):

File "C:\Users\ERIN\anaconda3\lib\site-packages\adobe\pdfservices\operation\internal\service\extract_pdf_api.py",  line52, in download_and_save

extract_data_parser.parse()

File "C:\Users\ERIN\anaconda3\lib\site-packages\adobe\pdfservices\operation\internal\service\extract_data_parser.py, line 180 in parse

self.ed_zipper.add_rendition_data(rendition_output)

File "C:\Users\ERIN\anaconda3\lib\site-packages\adove\pdfservices\operation\internal\service\extract_data_zipper.py", line 28, in add_rendition_data

file_name = rdata.file_name+rdata.rendition_extension

TypeError: can only concatenate str (not "NoneType) to str.

and the entire IDE then freezes completely. Does anyone have any ide what is going wrong or how to fix it?

This topic has been closed for replies.

3 replies

Raymond Camden
Community Manager
Community Manager
January 4, 2022

I'm very new to Python, can you tell me which IDE you are using? I'm assuming it isn't called "Python IDE" but I could be wrong. 🙂 

Participant
January 4, 2022

Hey,

 

I'm getting the same error, my IDE doesn't freeze though, it just spits out a very long error message after this one containing the entire structured JSON response - which I assume it what's causing the poster's IDE to freeze.

I think the root issue here, which I am getting as well, is the type error happening in the Adobe API which is shown in the stack trace above.

For me, it happens with some PDFs but not with others, I can't run enough calls through the API to pinpoint what's problematic about the PDFs, but I could send some that are giving me this issue 🙂

 

thanks,

Oz

Raymond Camden
Community Manager
Community Manager
January 4, 2022

If you don't mind, fire one or two off to me at jedimaster@adobe.com

Participant
January 4, 2022

I'm getting the same error, did you find out what causes this @defaultie6j6thvgnhw ?

Participant
July 30, 2021

Either rdata.file_name is None or rdata.rendition_extension is None. Try printing them out to see what is actually in those variables.