Python API does not allow setting multiple languages but doc says one can. #205

Open
opened 2026-02-16 00:17:08 -05:00 by yindo · 3 comments
Owner

Originally created by @stonesthatwhisper on GitHub (Jul 25, 2024).

related #245

Document says

Set language
LlamaParse use OCR to extract text from images. Our OCR supports a long list of languages and you can tell LlamaParse which language(s) to parse for by setting this option. You can specify multiple languages by separating them with a comma. This will only affect text extracted from images.

However I am getting this error with python:

File [~/miniconda3/envs/llm/lib/python3.10/site-packages/pydantic/v1/main.py:341](http://localhost:8888/lab/tree/~/miniconda3/envs/llm/lib/python3.10/site-packages/pydantic/v1/main.py#line=340), in BaseModel.__init__(__pydantic_self__, **data)
    339 values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data)
    340 if validation_error:
--> 341     raise validation_error
    342 try:
    343     object_setattr(__pydantic_self__, '__dict__', values)

ValidationError: 1 validation error for LlamaParse
language
  value is not a valid enumeration member; permitted: 'abq', 'ady', 'af', 'ang', 'ar', 'as', 'ava', 'az', 'be', 'bg', 'bh', 'bho', 'bn', 'bs', 'ch_sim', 'ch_tra', 'che', 'cs', 'cy', 'da', 'dar', 'de', 'en', 'es', 'et', 'fa', 'fr', 'ga', 'gom', 'hi', 'hr', 'hu', 'id', 'inh', 'is', 'it', 'ja', 'kbd', 'kn', 'ko', 'ku', 'la', 'lbe', 'lez', 'lt', 'lv', 'mah', 'mai', 'mi', 'mn', 'mr', 'ms', 'mt', 'ne', 'new', 'nl', 'no', 'oc', 'pi', 'pl', 'pt', 'ro', 'ru', 'rs_cyrillic', 'rs_latin', 'sck', 'sk', 'sl', 'sq', 'sv', 'sw', 'ta', 'tab', 'te', 'th', 'tjk', 'tl', 'tr', 'ug', 'uk', 'ur', 'uz', 'vi' (type=type_error.enum; enum_values=[<Language.BAZA: 'abq'>, <Language.ADYGHE: 'ady'>, <Language.AFRIKAANS: 'af'>, <Language.ANGIKA: 'ang'>,

Client:
Please remove untested options:

  • Python Library
Originally created by @stonesthatwhisper on GitHub (Jul 25, 2024). related #245 [Document says ](https://docs.cloud.llamaindex.ai/llamaparse/features/parsing_options) Set language LlamaParse use OCR to extract text from images. Our OCR supports a [long list of languages](https://github.com/run-llama/llama_parse/blob/main/llama_parse/utils.py#L16) and you can tell LlamaParse which language(s) to parse for by setting this option. **You can specify multiple languages by separating them with a comma.** This will only affect text extracted from images. However I am getting this error with python: ``` File [~/miniconda3/envs/llm/lib/python3.10/site-packages/pydantic/v1/main.py:341](http://localhost:8888/lab/tree/~/miniconda3/envs/llm/lib/python3.10/site-packages/pydantic/v1/main.py#line=340), in BaseModel.__init__(__pydantic_self__, **data) 339 values, fields_set, validation_error = validate_model(__pydantic_self__.__class__, data) 340 if validation_error: --> 341 raise validation_error 342 try: 343 object_setattr(__pydantic_self__, '__dict__', values) ValidationError: 1 validation error for LlamaParse language value is not a valid enumeration member; permitted: 'abq', 'ady', 'af', 'ang', 'ar', 'as', 'ava', 'az', 'be', 'bg', 'bh', 'bho', 'bn', 'bs', 'ch_sim', 'ch_tra', 'che', 'cs', 'cy', 'da', 'dar', 'de', 'en', 'es', 'et', 'fa', 'fr', 'ga', 'gom', 'hi', 'hr', 'hu', 'id', 'inh', 'is', 'it', 'ja', 'kbd', 'kn', 'ko', 'ku', 'la', 'lbe', 'lez', 'lt', 'lv', 'mah', 'mai', 'mi', 'mn', 'mr', 'ms', 'mt', 'ne', 'new', 'nl', 'no', 'oc', 'pi', 'pl', 'pt', 'ro', 'ru', 'rs_cyrillic', 'rs_latin', 'sck', 'sk', 'sl', 'sq', 'sv', 'sw', 'ta', 'tab', 'te', 'th', 'tjk', 'tl', 'tr', 'ug', 'uk', 'ur', 'uz', 'vi' (type=type_error.enum; enum_values=[<Language.BAZA: 'abq'>, <Language.ADYGHE: 'ady'>, <Language.AFRIKAANS: 'af'>, <Language.ANGIKA: 'ang'>, ``` **Client:** Please remove untested options: - Python Library
yindo added the bug label 2026-02-16 00:17:08 -05:00
Author
Owner

@galvangoh commented on GitHub (Jul 25, 2024):

If you are asking about simultaneous language support, it's in their roadmap but I guess we still have to wait.

@galvangoh commented on GitHub (Jul 25, 2024): If you are asking about simultaneous language support, it's in their roadmap but I guess we still have to wait.
Author
Owner

@adnan10tc39 commented on GitHub (Dec 2, 2024):

it support Hebrew?

@adnan10tc39 commented on GitHub (Dec 2, 2024): it support Hebrew?
Author
Owner

@nattapon-weaverbase commented on GitHub (Jul 20, 2025):

Workaround

For anyone experiencing this issue.

parser = LlamaParse(api_key=api_key)
parser.language = ['en', 'fr']
job_result = await parser.aparse(file)
@nattapon-weaverbase commented on GitHub (Jul 20, 2025): ### Workaround For anyone experiencing this issue. ```python parser = LlamaParse(api_key=api_key) parser.language = ['en', 'fr'] job_result = await parser.aparse(file) ```
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#205