Error while parsing the PDF file: Failed to parse the PDF file: Internal Server Error #4

Closed
opened 2026-02-16 00:16:35 -05:00 by yindo · 11 comments
Owner

Originally created by @SmileLollipop on GitHub (Feb 22, 2024).

Originally created by @SmileLollipop on GitHub (Feb 22, 2024).
yindo closed this issue 2026-02-16 00:16:35 -05:00
Author
Owner

@GeoloeG-IsT commented on GitHub (Feb 23, 2024):

very descriptive! :)

@GeoloeG-IsT commented on GitHub (Feb 23, 2024): very descriptive! :)
Author
Owner

@anoopshrma commented on GitHub (Feb 24, 2024):

Hi @SmileLollipop
There could be some issue at llamacloud. Could you try again and check if you facing the same issue or not

@anoopshrma commented on GitHub (Feb 24, 2024): Hi @SmileLollipop There could be some issue at llamacloud. Could you try again and check if you facing the same issue or not
Author
Owner

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

I am facing the same issue:

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"]}}]}

When I tried to load a document with LLama Parse using load_data function:
from llama_parse import LlamaParse # pip install llama-parse

parser = LlamaParse(
    api_key=os.environ["LLAMA_CLOUD_API_KEY"],  # can also be set in your env as LLAMA_CLOUD_API_KEY
    result_type="markdown"  # "markdown" and "text" are available
)

documents = parser.load_data("example.pdf")

The PDF is fine, I am loaded it with other tools.

I am using the following versions:

llama-index                              0.10.15
llama-index-agent-openai                 0.1.5
llama-index-cli                          0.1.7
llama-index-core                         0.10.15
llama-index-embeddings-openai            0.1.6
llama-index-indices-managed-llama-cloud  0.1.3
llama-index-legacy                       0.9.48
llama-index-llms-openai                  0.1.7
llama-index-multi-modal-llms-openai      0.1.4
llama-index-program-openai               0.1.4
llama-index-question-gen-openai          0.1.3
llama-index-readers-file                 0.1.6
llama-index-readers-llama-parse          0.1.3
llama-index-vector-stores-chroma         0.1.5
llama-parse                              0.3.5
@httplups commented on GitHub (Mar 5, 2024): I am facing the same issue: > 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"]}}]} When I tried to load a document with LLama Parse using load_data function: ` from llama_parse import LlamaParse # pip install llama-parse` ``` parser = LlamaParse( api_key=os.environ["LLAMA_CLOUD_API_KEY"], # can also be set in your env as LLAMA_CLOUD_API_KEY result_type="markdown" # "markdown" and "text" are available ) ``` `documents = parser.load_data("example.pdf")` The PDF is fine, I am loaded it with other tools. I am using the following versions: <pre>llama-index 0.10.15 llama-index-agent-openai 0.1.5 llama-index-cli 0.1.7 llama-index-core 0.10.15 llama-index-embeddings-openai 0.1.6 llama-index-indices-managed-llama-cloud 0.1.3 llama-index-legacy 0.9.48 llama-index-llms-openai 0.1.7 llama-index-multi-modal-llms-openai 0.1.4 llama-index-program-openai 0.1.4 llama-index-question-gen-openai 0.1.3 llama-index-readers-file 0.1.6 llama-index-readers-llama-parse 0.1.3 llama-index-vector-stores-chroma 0.1.5 llama-parse 0.3.5 </pre>
Author
Owner

@GeoloeG-IsT commented on GitHub (Mar 5, 2024):

parser = LlamaParse(
api_key=os.environ["LLAMA_CLOUD_API_KEY"], # can also be set in your env as LLAMA_CLOUD_API_KEY
result_type="markdown" # "markdown" and "text" are available
)

try to add a language like language='en' as a workaround to set a proper language value as param to LlamaParse call

@GeoloeG-IsT commented on GitHub (Mar 5, 2024): > parser = LlamaParse( > api_key=os.environ["LLAMA_CLOUD_API_KEY"], # can also be set in your env as LLAMA_CLOUD_API_KEY > result_type="markdown" # "markdown" and "text" are available > ) try to add a language like `language='en'` as a workaround to set a proper language value as param to `LlamaParse` call
Author
Owner

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

parser = LlamaParse(
api_key=os.environ["LLAMA_CLOUD_API_KEY"], # can also be set in your env as LLAMA_CLOUD_API_KEY
result_type="markdown" # "markdown" and "text" are available
)

try to add a language like language='en' as a workaround to set a proper language value as param to LlamaParse call

Thank you. It worked!

@httplups commented on GitHub (Mar 6, 2024): > > parser = LlamaParse( > > api_key=os.environ["LLAMA_CLOUD_API_KEY"], # can also be set in your env as LLAMA_CLOUD_API_KEY > > result_type="markdown" # "markdown" and "text" are available > > ) > > try to add a language like `language='en'` as a workaround to set a proper language value as param to `LlamaParse` call Thank you. It worked!
Author
Owner

@dominicdev commented on GitHub (Jul 1, 2024):

getting this error tried adding langguage but sill getting same error, any fixed?

@dominicdev commented on GitHub (Jul 1, 2024): getting this error tried adding langguage but sill getting same error, any fixed?
Author
Owner

@anoopshrma commented on GitHub (Jul 1, 2024):

getting this error tried adding langguage but sill getting same error, any fixed?

What is your llama-parse lib version. I would suggest lib upgrade pip install -U llama-parse
And then try with providing language.

@anoopshrma commented on GitHub (Jul 1, 2024): > getting this error tried adding langguage but sill getting same error, any fixed? What is your llama-parse lib version. I would suggest lib upgrade `pip install -U llama-parse` And then try with providing language.
Author
Owner

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

I have the llama-parse 0.4.6, and get the same error

@nikky78 commented on GitHub (Jul 11, 2024): I have the llama-parse 0.4.6, and get the same error
Author
Owner

@SatyajeetPatra-11 commented on GitHub (Aug 5, 2024):

I am facing same issue

@SatyajeetPatra-11 commented on GitHub (Aug 5, 2024): I am facing same issue
Author
Owner

@hzzheng0612 commented on GitHub (Aug 5, 2024):

Same issue

@hzzheng0612 commented on GitHub (Aug 5, 2024): Same issue
Author
Owner

@PBritto697 commented on GitHub (Jan 18, 2025):

I've just run into the same issue here. I even get the same random characters at the llamacloud playground. It was working before, at least on the playground, a few hours ago. I can't get it to work neither via API or Playground.

@PBritto697 commented on GitHub (Jan 18, 2025): I've just run into the same issue here. I even get the same random characters at the llamacloud playground. It was working before, at least on the playground, a few hours ago. I can't get it to work neither via API or Playground.
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#4