Error while parsing the PDF file: Failed to parse the PDF file #28

Closed
opened 2026-02-16 00:16:39 -05:00 by yindo · 6 comments
Owner

Originally created by @valeriodipalo on GitHub (Mar 5, 2024).

While working in the online preview, I get this error when running it on Jupyter notebook:
Error while parsing the PDF file: Failed to parse the PDF file: {"detail":[{"loc":["body","language",0],"msg":"value is not a valid enumeration member; permitted: 'af', 'az', 'bs', 'cs', 'cy', 'da', 'de', 'en', 'es', 'et', 'fr', 'ga', 'hr', 'hu', 'id', 'is', 'it', 'ku', 'la', 'lt', 'lv', 'mi', 'ms', 'mt', 'nl', 'no', 'oc', 'pi', 'pl', 'pt', 'ro', 'rs_latin', 'sk', 'sl', 'sq', 'sv', 'sw', 'tl', 'tr', 'uz', 'vi', 'ar', 'fa', 'ug', 'ur', 'bn', 'as', 'mni', 'ru', 'rs_cyrillic', 'be', 'bg', 'uk', 'mn', 'abq', 'ady', 'kbd', 'ava', 'dar', 'inh', 'che', 'lbe', 'lez', 'tab', 'tjk', 'hi', 'mr', 'ne', 'bh', 'mai', 'ang', 'bho', 'mah', 'sck', 'new', 'gom', 'sa', 'bgc', 'th', 'ch_sim', 'ch_tra', 'ja', 'ko', 'ta', 'te', 'kn'","type":"type_error.enum","ctx":{"enum_values":["af","az","bs","cs","cy","da","de","en","es","et","fr","ga","hr","hu","id","is","it","ku","la","lt","lv","mi","ms","mt","nl","no","oc","pi","pl","pt","ro","rs_latin","sk","sl","sq","sv","sw","tl","tr","uz","vi","ar","fa","ug","ur","bn","as","mni","ru","rs_cyrillic","be","bg","uk","mn","abq","ady","kbd","ava","dar","inh","che","lbe","lez","tab","tjk","hi","mr","ne","bh","mai","ang","bho","mah","sck","new","gom","sa","bgc","th","ch_sim","ch_tra","ja","ko","ta","te","kn"]}}]}

Originally created by @valeriodipalo on GitHub (Mar 5, 2024). While working in the online preview, I get this error when running it on Jupyter notebook: `Error while parsing the PDF file: Failed to parse the PDF file: {"detail":[{"loc":["body","language",0],"msg":"value is not a valid enumeration member; permitted: 'af', 'az', 'bs', 'cs', 'cy', 'da', 'de', 'en', 'es', 'et', 'fr', 'ga', 'hr', 'hu', 'id', 'is', 'it', 'ku', 'la', 'lt', 'lv', 'mi', 'ms', 'mt', 'nl', 'no', 'oc', 'pi', 'pl', 'pt', 'ro', 'rs_latin', 'sk', 'sl', 'sq', 'sv', 'sw', 'tl', 'tr', 'uz', 'vi', 'ar', 'fa', 'ug', 'ur', 'bn', 'as', 'mni', 'ru', 'rs_cyrillic', 'be', 'bg', 'uk', 'mn', 'abq', 'ady', 'kbd', 'ava', 'dar', 'inh', 'che', 'lbe', 'lez', 'tab', 'tjk', 'hi', 'mr', 'ne', 'bh', 'mai', 'ang', 'bho', 'mah', 'sck', 'new', 'gom', 'sa', 'bgc', 'th', 'ch_sim', 'ch_tra', 'ja', 'ko', 'ta', 'te', 'kn'","type":"type_error.enum","ctx":{"enum_values":["af","az","bs","cs","cy","da","de","en","es","et","fr","ga","hr","hu","id","is","it","ku","la","lt","lv","mi","ms","mt","nl","no","oc","pi","pl","pt","ro","rs_latin","sk","sl","sq","sv","sw","tl","tr","uz","vi","ar","fa","ug","ur","bn","as","mni","ru","rs_cyrillic","be","bg","uk","mn","abq","ady","kbd","ava","dar","inh","che","lbe","lez","tab","tjk","hi","mr","ne","bh","mai","ang","bho","mah","sck","new","gom","sa","bgc","th","ch_sim","ch_tra","ja","ko","ta","te","kn"]}}]}`
yindo added the bug label 2026-02-16 00:16:39 -05:00
yindo closed this issue 2026-02-16 00:16:39 -05:00
Author
Owner

@hexapode commented on GitHub (Mar 5, 2024):

This was just fix by https://github.com/run-llama/llama_parse/pull/60

Can you try to update your llama_parse package?

Thanks for reporting!

@hexapode commented on GitHub (Mar 5, 2024): This was just fix by https://github.com/run-llama/llama_parse/pull/60 Can you try to update your llama_parse package? Thanks for reporting!
Author
Owner

@httplups commented on GitHub (Mar 21, 2024):

Try to set up the language when creating the LLamaParse object

@httplups commented on GitHub (Mar 21, 2024): Try to set up the language when creating the LLamaParse object
Author
Owner

@abhibarman commented on GitHub (Apr 12, 2024):

I was getting same error for the below code ..

from llama_parse import LlamaParse
pdf_file_name = './insurance.pdf'
documents = LlamaParse(result_type="markdown").load_data(pdf_file_name)

Below changes fixed the isssue:

from llama_parse import LlamaParse
from llama_parse.base import ResultType, Language
pdf_file_name = './insurance.pdf'

documents = LlamaParse(result_type=ResultType.MD,language=Language.ENGLISH).load_data(pdf_file_name)

@abhibarman commented on GitHub (Apr 12, 2024): I was getting same error for the below code .. from llama_parse import LlamaParse pdf_file_name = './insurance.pdf' documents = LlamaParse(result_type="markdown").load_data(pdf_file_name) Below changes fixed the isssue: from llama_parse import LlamaParse from llama_parse.base import ResultType, Language pdf_file_name = './insurance.pdf' documents = LlamaParse(result_type=ResultType.MD,language=Language.ENGLISH).load_data(pdf_file_name)
Author
Owner

@BinaryBrain commented on GitHub (Jul 9, 2024):

This was probably fixed. I just tried to run:

from llama_parse import LlamaParse
pdf_file_name = './insurance.pdf'
documents = LlamaParse(result_type="markdown").load_data(pdf_file_name)
print(documents)

and got a result.
Please repoen if it's still not working on your side.

@BinaryBrain commented on GitHub (Jul 9, 2024): This was probably fixed. I just tried to run: ```py from llama_parse import LlamaParse pdf_file_name = './insurance.pdf' documents = LlamaParse(result_type="markdown").load_data(pdf_file_name) print(documents) ``` and got a result. Please repoen if it's still not working on your side.
Author
Owner

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

I get the same error with the version 0.4.6

@nikky78 commented on GitHub (Jul 11, 2024): I get the same error with the version 0.4.6
Author
Owner

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

Hi @nikky78
Can you provide your code so I can reproduce the issue?

@BinaryBrain commented on GitHub (Jul 11, 2024): Hi @nikky78 Can you provide your code so I can reproduce the issue?
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#28