Llama Parse import Issue #302

Closed
opened 2026-02-16 00:17:24 -05:00 by yindo · 3 comments
Owner

Originally created by @JoseGHdz on GitHub (Oct 18, 2024).

Note: we're aware of some missing content in the output and layout issues on tables. Please refrain from opening new issues on this topic unless if you think it's different from what has already been reported.

Describe the bug
I installed Llama Parse in my environment and when I call 'from llama_parse import LlamaParse' I get an error saying:

File /opt/homebrew/lib/python3.11/site-packages/llama_parse/__init__.py:1
----> 1 from llama_parse.base import LlamaParse, ResultType
3 all = ["LlamaParse", "ResultType"]

File /opt/homebrew/lib/python3.11/site-packages/llama_parse/base.py:16
14 from fsspec.spec import AbstractBufferedFile
15 from llama_index.core.async_utils import run_jobs
---> 16 from llama_index.core.bridge.pydantic import Field, field_validator
17 from llama_index.core.constants import DEFAULT_BASE_URL
18 from llama_index.core.readers.base import BasePydanticReader

ImportError: cannot import name 'field_validator' from 'llama_index.core.bridge.pydantic' (/opt/homebrew/lib/python3.11/site-packages/llama_index/core/bridge/pydantic.py)

Files
None

Job ID
None

Screenshots
Feel free to also provide screenshots if relevant.
image

Options
I just followed the instructions from here:
https://github.com/run-llama/llama_parse

Additional context
These are my package versions:
llama-cloud 0.1.4
llama-index 0.11.18
llama-index-agent-openai 0.3.4
llama-index-cli 0.3.1
llama-index-core 0.11.18
llama-index-embeddings-adapter 0.1.0
llama-index-embeddings-openai 0.2.5
llama-index-finetuning 0.1.0
llama-index-indices-managed-llama-cloud 0.4.0
llama-index-legacy 0.9.48
llama-index-llms-gradient 0.1.0
llama-index-llms-openai 0.2.15
llama-index-multi-modal-llms-openai 0.2.2
llama-index-postprocessor-cohere-rerank 0.1.0
llama-index-program-openai 0.2.0
llama-index-question-gen-openai 0.2.0
llama-index-readers-file 0.2.2
llama-index-readers-llama-parse 0.3.0
llama-index-vector-stores-chroma 0.1.10
llama-parse 0.5.10
llamaindex-py-client 0.1.19

Originally created by @JoseGHdz on GitHub (Oct 18, 2024). _Note: we're aware of some missing content in the output and layout issues on tables. Please refrain from opening new issues on this topic unless if you think it's different from what has already been reported._ **Describe the bug** I installed Llama Parse in my environment and when I call 'from llama_parse import LlamaParse' I get an error saying: File /opt/homebrew/lib/python3.11/site-packages/llama_parse/__init__.py:1 ----> [1](https://file+.vscode-resource.vscode-cdn.net/opt/homebrew/lib/python3.11/site-packages/llama_parse/__init__.py:1) from llama_parse.base import LlamaParse, ResultType [3](https://file+.vscode-resource.vscode-cdn.net/opt/homebrew/lib/python3.11/site-packages/llama_parse/__init__.py:3) __all__ = ["LlamaParse", "ResultType"] File /opt/homebrew/lib/python3.11/site-packages/llama_parse/base.py:16 [14](https://file+.vscode-resource.vscode-cdn.net/opt/homebrew/lib/python3.11/site-packages/llama_parse/base.py:14) from fsspec.spec import AbstractBufferedFile [15](https://file+.vscode-resource.vscode-cdn.net/opt/homebrew/lib/python3.11/site-packages/llama_parse/base.py:15) from llama_index.core.async_utils import run_jobs ---> [16](https://file+.vscode-resource.vscode-cdn.net/opt/homebrew/lib/python3.11/site-packages/llama_parse/base.py:16) from llama_index.core.bridge.pydantic import Field, field_validator [17](https://file+.vscode-resource.vscode-cdn.net/opt/homebrew/lib/python3.11/site-packages/llama_parse/base.py:17) from llama_index.core.constants import DEFAULT_BASE_URL [18](https://file+.vscode-resource.vscode-cdn.net/opt/homebrew/lib/python3.11/site-packages/llama_parse/base.py:18) from llama_index.core.readers.base import BasePydanticReader ImportError: cannot import name 'field_validator' from 'llama_index.core.bridge.pydantic' (/opt/homebrew/lib/python3.11/site-packages/llama_index/core/bridge/pydantic.py) **Files** None **Job ID** None **Screenshots** Feel free to also provide screenshots if relevant. ![image](https://github.com/user-attachments/assets/2b125065-a1c5-4ebc-97e6-8ca1a00e05f6) **Options** I just followed the instructions from here: https://github.com/run-llama/llama_parse **Additional context** These are my package versions: llama-cloud 0.1.4 llama-index 0.11.18 llama-index-agent-openai 0.3.4 llama-index-cli 0.3.1 llama-index-core 0.11.18 llama-index-embeddings-adapter 0.1.0 llama-index-embeddings-openai 0.2.5 llama-index-finetuning 0.1.0 llama-index-indices-managed-llama-cloud 0.4.0 llama-index-legacy 0.9.48 llama-index-llms-gradient 0.1.0 llama-index-llms-openai 0.2.15 llama-index-multi-modal-llms-openai 0.2.2 llama-index-postprocessor-cohere-rerank 0.1.0 llama-index-program-openai 0.2.0 llama-index-question-gen-openai 0.2.0 llama-index-readers-file 0.2.2 llama-index-readers-llama-parse 0.3.0 llama-index-vector-stores-chroma 0.1.10 llama-parse 0.5.10 llamaindex-py-client 0.1.19
yindo added the bug label 2026-02-16 00:17:24 -05:00
yindo closed this issue 2026-02-16 00:17:25 -05:00
Author
Owner

@logan-markewich commented on GitHub (Oct 18, 2024):

@JoseGHdz I'm not able to reproduce

https://colab.research.google.com/drive/1qgAxMGFcFqBeQcyRJlsb9YiUr1ZSJq8Z?usp=sharing

@logan-markewich commented on GitHub (Oct 18, 2024): @JoseGHdz I'm not able to reproduce https://colab.research.google.com/drive/1qgAxMGFcFqBeQcyRJlsb9YiUr1ZSJq8Z?usp=sharing
Author
Owner

@logan-markewich commented on GitHub (Oct 18, 2024):

If you are in a notebook, maybe try restarting it? Or if not, maybe try from a fresh venv

@logan-markewich commented on GitHub (Oct 18, 2024): If you are in a notebook, maybe try restarting it? Or if not, maybe try from a fresh venv
Author
Owner

@JoseGHdz commented on GitHub (Oct 28, 2024):

If you are in a notebook, maybe try restarting it? Or if not, maybe try from a fresh venv

Sorry for the late response. I was working on a notebook, and I restarted the notebook and it worked.

@JoseGHdz commented on GitHub (Oct 28, 2024): > If you are in a notebook, maybe try restarting it? Or if not, maybe try from a fresh venv Sorry for the late response. I was working on a notebook, and I restarted the notebook and it worked.
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#302