In RAG notebook, Parse error #245

Closed
opened 2026-02-16 00:17:15 -05:00 by yindo · 1 comment
Owner

Originally created by @coopshea on GitHub (Aug 27, 2024).

In the product_manual_rag.ipynb, llama parse isn't working.

md_json_objs = parser.get_json_result(files)
md_json_list = md_json_objs[0]["pages"]
image_dicts = parser.get_images(md_json_objs, download_path="data_images")

The following parse errors occur:

Parsing files: 100%|██████████| 5/5 [00:00<00:00, 10.98it/s]Error while parsing the file 'data/smagora_instruction_manual.pdf': Illegal header value b'Bearer llx-YS3Hh4dgBuUtai6Ipjh8Ahr19wr3HivGkIEBPC8kfCzC9GRt '
Error while parsing the file 'data/tuffing_instruction_manual.pdf': Illegal header value b'Bearer llx-YS3Hh4dgBuUtai6Ipjh8Ahr19wr3HivGkIEBPC8kfCzC9GRt '
Error while parsing the file 'data/uppspel_instruction_manual.pdf': Illegal header value b'Bearer llx-YS3Hh4dgBuUtai6Ipjh8Ahr19wr3HivGkIEBPC8kfCzC9GRt '
Error while parsing the file 'data/fredde_instruction_manual.pdf': Illegal header value b'Bearer llx-YS3Hh4dgBuUtai6Ipjh8Ahr19wr3HivGkIEBPC8kfCzC9GRt '
Error while parsing the file 'data/nordli_instruction_manual.pdf': Illegal header value b'Bearer llx-YS3Hh4dgBuUtai6Ipjh8Ahr19wr3HivGkIEBPC8kfCzC9GRt '


IndexError Traceback (most recent call last)
in <cell line: 2>()
1 md_json_objs = parser.get_json_result(files)
----> 2 md_json_list = md_json_objs[0]["pages"]
3 image_dicts = parser.get_images(md_json_objs, download_path="data_images")

IndexError: list index out of range

Originally created by @coopshea on GitHub (Aug 27, 2024). In the product_manual_rag.ipynb, llama parse isn't working. md_json_objs = parser.get_json_result(files) md_json_list = md_json_objs[0]["pages"] image_dicts = parser.get_images(md_json_objs, download_path="data_images") The following parse errors occur: Parsing files: 100%|██████████| 5/5 [00:00<00:00, 10.98it/s]Error while parsing the file 'data/smagora_instruction_manual.pdf': Illegal header value b'Bearer llx-YS3Hh4dgBuUtai6Ipjh8Ahr19wr3HivGkIEBPC8kfCzC9GRt ' Error while parsing the file 'data/tuffing_instruction_manual.pdf': Illegal header value b'Bearer llx-YS3Hh4dgBuUtai6Ipjh8Ahr19wr3HivGkIEBPC8kfCzC9GRt ' Error while parsing the file 'data/uppspel_instruction_manual.pdf': Illegal header value b'Bearer llx-YS3Hh4dgBuUtai6Ipjh8Ahr19wr3HivGkIEBPC8kfCzC9GRt ' Error while parsing the file 'data/fredde_instruction_manual.pdf': Illegal header value b'Bearer llx-YS3Hh4dgBuUtai6Ipjh8Ahr19wr3HivGkIEBPC8kfCzC9GRt ' Error while parsing the file 'data/nordli_instruction_manual.pdf': Illegal header value b'Bearer llx-YS3Hh4dgBuUtai6Ipjh8Ahr19wr3HivGkIEBPC8kfCzC9GRt ' --------------------------------------------------------------------------- IndexError Traceback (most recent call last) [<ipython-input-10-64ff7e4fd9ae>](https://localhost:8080/#) in <cell line: 2>() 1 md_json_objs = parser.get_json_result(files) ----> 2 md_json_list = md_json_objs[0]["pages"] 3 image_dicts = parser.get_images(md_json_objs, download_path="data_images") IndexError: list index out of range
yindo closed this issue 2026-02-16 00:17:15 -05:00
Author
Owner

@coopshea commented on GitHub (Aug 27, 2024):

If anyone else has this issue, I accidentally pasted an extra space in my API key.

@coopshea commented on GitHub (Aug 27, 2024): If anyone else has this issue, I accidentally pasted an extra space in my API key.
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#245