Tool import error. Change in new update?

Here’s the error

Traceback (most recent call last):
  File "/Users/alexanderchristian/alpha_composer/alpha_trading/main.py", line 12, in <module>
    from tools import (
  File "/Users/alexanderchristian/alpha_composer/alpha_trading/tools.py", line 4, in <module>
    from crewai import BaseTool
ImportError: cannot import name 'BaseTool' from 'crewai' (/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/crewai/__init__.py)

This is the correct import statement:

from crewai.tools import BaseTool
...

thanks @tonykipkemboi

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.