You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While Importing paydantic_ai i am faceing error - AttributeError: module 'wrapt' has no attribute 'AdapterFactory'
(doc-infer) D:\python\doc-inference>python
Python 3.11.6 (tags/v3.11.6:8b6ee5b, Oct 2 2023, 14:57:12) [MSC v.1935 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>>
>>>
>>> from pydantic_ai import Agent, ModelRetry
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "D:\python\doc-inference\.venv\Lib\site-packages\pydantic_ai\__init__.py", line 3, in <module>
from .agent import Agent, CallToolsNode, EndStrategy, ModelRequestNode, UserPromptNode, capture_run_messages
File "D:\python\doc-inference\.venv\Lib\site-packages\pydantic_ai\agent.py", line 13, in <module>
from opentelemetry.trace import NoOpTracer, use_span
File "D:\python\doc-inference\.venv\Lib\site-packages\opentelemetry\trace\__init__.py", line 83, in <module>
from deprecated import deprecated
File "D:\python\doc-inference\.venv\Lib\site-packages\deprecated\__init__.py", line 15, in <module>
from deprecated.classic import deprecated
File "D:\python\doc-inference\.venv\Lib\site-packages\deprecated\classic.py", line 35, in <module>
class ClassicAdapter(wrapt.AdapterFactory):
^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'wrapt' has no attribute 'AdapterFactory'
>>> exit()
Example Code
frompydantic_aiimportAgent, ModelRetry
Python, Pydantic AI & LLM client version
Python : Python 3.11.6
OS: Windows
D:\python\doc-inference>uv add pydantic-ai-slim[openai]
Resolved 144 packages in 995ms
Prepared 6 packages in 609ms
░░░░░░░░░░░░░░░░░░░░ [0/13] Installing wheels... warning: Failed to hardlink files; falling back to full copy. This may lead to degraded performance.
If the cache and target directories are on different filesystems, hardlinking may not be supported.
If this is intentional, set `export UV_LINK_MODE=copy` or use `--link-mode=copy` to suppress this warning.
Installed 13 packages in 306ms
+ deprecated==1.2.18
+ distro==1.9.0
+ eval-type-backport==0.2.2
+ griffe==1.7.3
+ importlib-metadata==8.6.1
+ jiter==0.9.0
+ logfire-api==3.14.1
+ openai==1.76.2
+ opentelemetry-api==1.32.1
+ pydantic-ai-slim==0.1.9
+ pydantic-graph==0.1.9
+ tqdm==4.67.1
+ typing-inspection==0.4.0
The text was updated successfully, but these errors were encountered:
I removed the entire virtual environment and performed a fresh installation using uv install. The issue no longer occurs, and I'm currently struggling to reproduce it
Initial Checks
Description
While Importing paydantic_ai i am faceing error - AttributeError: module 'wrapt' has no attribute 'AdapterFactory'
Example Code
Python, Pydantic AI & LLM client version
The text was updated successfully, but these errors were encountered: