[GH-ISSUE #10868] AttributeError: 'OllamaLLM' object has no attribute '__pydantic_private__' #7141

Closed
opened 2026-04-12 19:08:49 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @0xD4rky on GitHub (May 26, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/10868

I have looked up all the issues regarding this but couldn't find the fix to it. Please help:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/distilabel/llms/base.py", line 501, in __del__
    if self._new_event_loop:
       ^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pydantic/main.py", line 970, in __getattr__
    return self.__pydantic_private__[item]  # type: ignore
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pydantic/main.py", line 988, in __getattr__
    return super().__getattribute__(item)  # Raises AttributeError if appropriate
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'OllamaLLM' object has no attribute '__pydantic_private__'
Originally created by @0xD4rky on GitHub (May 26, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/10868 I have looked up all the issues regarding this but couldn't find the fix to it. Please help: ``` Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/distilabel/llms/base.py", line 501, in __del__ if self._new_event_loop: ^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pydantic/main.py", line 970, in __getattr__ return self.__pydantic_private__[item] # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pydantic/main.py", line 988, in __getattr__ return super().__getattribute__(item) # Raises AttributeError if appropriate ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'OllamaLLM' object has no attribute '__pydantic_private__' ```
Author
Owner

@rick-github commented on GitHub (May 27, 2025):

Doesn't look like an ollama issue. Based on the mention of OllamaLLM, I'm going to assume you are using langchain. Langchain issue tracker is here.

<!-- gh-comment-id:2912029174 --> @rick-github commented on GitHub (May 27, 2025): Doesn't look like an ollama issue. Based on the mention of `OllamaLLM`, I'm going to assume you are using langchain. Langchain issue tracker is [here](https://github.com/langchain-ai/langchain/issues).
Author
Owner

@0xD4rky commented on GitHub (May 27, 2025):

sorry @rick-github, my bad, it was an issue from distilabel library.

<!-- gh-comment-id:2912389330 --> @0xD4rky commented on GitHub (May 27, 2025): sorry @rick-github, my bad, it was an issue from distilabel library.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#7141