job return : Result not found. Check job status to see if it has completed. #178

Closed
opened 2026-02-16 00:17:04 -05:00 by yindo · 5 comments
Owner

Originally created by @tkcoding on GitHub (Jul 11, 2024).

Scenario:

  • For the first time file is parse for llama parse to process , it runs with return of json objects and successfully parsed.
  • Parse the same file second time , json_objs will return with job status of results not found

To reproduce

from llama_parse import LlamaParse

ins = """
You are a highly proficient language model designed to convert pages from PDF, PPT and other files into structured markdown text. Your goal is to accurately transcribe text, represent formulas in LaTeX MathJax notation, and identify and describe images, particularly graphs and other graphical elements.

You have been tasked with creating a markdown copy of each page from the provided PDF or PPT image. Each image description must include a full description of the content, a summary of the graphical object, and the approximate coordinates of the object relative to the page layout.

Maintain the sequence of all the elements.

For the following element, follow the requirement of extraction:
for Text:
   - Extract all readable text from the page.
   - Exclude any diagonal text, headers, and footers.

for Formulas:
   - Identify and convert all formulas into LaTeX MathJax notation.

for Image Identification and Description:
   - Identify all images, graphs, and other graphical elements on the page.
   - For each image, include a full description of the content in the alt text, followed by a brief summary of the graphical object.
   - If the image has a subtitle or caption, include it in the description.

# OUTPUT INSTRUCTIONS

- Ensure all formulas are in LaTeX MathJax notation.
- Exclude any diagonal text, headers, and footers from the output.
- For each image, provide a detailed description and summary, along with base64 representation of the image.
"""

pdf_file_name = "attention_is_all_you_need.pdf"
parser = LlamaParse(parsing_instruction=ins,language="en",verbose=True)
json_objs = parser.get_json_result(pdf_file_name)
print(f"Json objs : {json_objs}")
json_list = json_objs[0]["pages"] 

File :
attention_is_all_you_need.pdf

Additional information :
if I run curl for the jobid : I will get it was successfully process.

To curl for results , I used:

curl -X 'GET' \
  'https://api.cloud.llamaindex.ai/api/parsing/job/<job_id>' \
  -H 'accept: application/json' \
  -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"

CURL results :
{"id":"584813ca-5482-48e4-8441-ca9c5a47dc8b","status":"SUCCESS"}

Originally created by @tkcoding on GitHub (Jul 11, 2024). ## Scenario: - For the first time file is parse for llama parse to process , it runs with return of json objects and successfully parsed. - Parse the same file second time , **json_objs will return with job status of results not found** ## To reproduce ``` from llama_parse import LlamaParse ins = """ You are a highly proficient language model designed to convert pages from PDF, PPT and other files into structured markdown text. Your goal is to accurately transcribe text, represent formulas in LaTeX MathJax notation, and identify and describe images, particularly graphs and other graphical elements. You have been tasked with creating a markdown copy of each page from the provided PDF or PPT image. Each image description must include a full description of the content, a summary of the graphical object, and the approximate coordinates of the object relative to the page layout. Maintain the sequence of all the elements. For the following element, follow the requirement of extraction: for Text: - Extract all readable text from the page. - Exclude any diagonal text, headers, and footers. for Formulas: - Identify and convert all formulas into LaTeX MathJax notation. for Image Identification and Description: - Identify all images, graphs, and other graphical elements on the page. - For each image, include a full description of the content in the alt text, followed by a brief summary of the graphical object. - If the image has a subtitle or caption, include it in the description. # OUTPUT INSTRUCTIONS - Ensure all formulas are in LaTeX MathJax notation. - Exclude any diagonal text, headers, and footers from the output. - For each image, provide a detailed description and summary, along with base64 representation of the image. """ pdf_file_name = "attention_is_all_you_need.pdf" parser = LlamaParse(parsing_instruction=ins,language="en",verbose=True) json_objs = parser.get_json_result(pdf_file_name) print(f"Json objs : {json_objs}") json_list = json_objs[0]["pages"] ``` File : [attention_is_all_you_need.pdf](https://github.com/user-attachments/files/16171350/attention_is_all_you_need.pdf) Additional information : if I run curl for the jobid : I will get it was successfully process. To curl for results , I used: ``` curl -X 'GET' \ 'https://api.cloud.llamaindex.ai/api/parsing/job/<job_id>' \ -H 'accept: application/json' \ -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" ``` CURL results : {"id":"584813ca-5482-48e4-8441-ca9c5a47dc8b","status":"SUCCESS"}
yindo closed this issue 2026-02-16 00:17:04 -05:00
Author
Owner

@tkcoding commented on GitHub (Jul 11, 2024):

The workaround for this is to add 'invalidate_cache = True' , I believe the problems is llama parse is trying to retrieve the previous results that was cache to remove processing the same document twice (reduce cost).

full code :

from llama_parse import LlamaParse
pdf_file_name = "attention_is_all_you_need.pdf"
parser = LlamaParse(parsing_instruction=ins,invalidate_cache=True,language="en",verbose=True)
json_objs = parser.get_json_result(pdf_file_name)
json_list = json_objs[0]["pages"]

However , please let me know if there's a long term fix which doesn't need to re-process the document again .

@tkcoding commented on GitHub (Jul 11, 2024): The workaround for this is to add 'invalidate_cache = True' , I believe the problems is llama parse is trying to retrieve the previous results that was cache to remove processing the same document twice (reduce cost). full code : ``` from llama_parse import LlamaParse pdf_file_name = "attention_is_all_you_need.pdf" parser = LlamaParse(parsing_instruction=ins,invalidate_cache=True,language="en",verbose=True) json_objs = parser.get_json_result(pdf_file_name) json_list = json_objs[0]["pages"] ``` However , please let me know if there's a long term fix which doesn't need to re-process the document again .
Author
Owner

@akabeera commented on GitHub (Jul 23, 2024):

I'm running into the same issue. I have documents that's 100+ pages long. Invalidating the cache will mean I will incur the credits to parse the same documents again, right?

@akabeera commented on GitHub (Jul 23, 2024): I'm running into the same issue. I have documents that's 100+ pages long. Invalidating the cache will mean I will incur the credits to parse the same documents again, right?
Author
Owner

@tkcoding commented on GitHub (Jul 23, 2024):

@

I'm running into the same issue. I have documents that's 100+ pages long. Invalidating the cache will mean I will incur the credits to parse the same documents again, right?

Yes . until dev fix the cache problem , this will be the only way.
I would suggest you to just run few pages first (to save the cost ) and after experiment the output is positive then you proceed to process the whole document.

@tkcoding commented on GitHub (Jul 23, 2024): @ > I'm running into the same issue. I have documents that's 100+ pages long. Invalidating the cache will mean I will incur the credits to parse the same documents again, right? Yes . until dev fix the cache problem , this will be the only way. I would suggest you to just run few pages first (to save the cost ) and after experiment the output is positive then you proceed to process the whole document.
Author
Owner

@emorling commented on GitHub (Jul 24, 2024):

subscribe

@emorling commented on GitHub (Jul 24, 2024): subscribe
Author
Owner

@hexapode commented on GitHub (Jul 26, 2024):

This is now solved in production without the need to invalid_cache=True

@hexapode commented on GitHub (Jul 26, 2024): This is now solved in production without the need to `invalid_cache=True`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/llama_cloud_services#178