Import Error: cannot import name 'identity' from 'phi.utils'? Cant fix

from phi.tools.yfinance import YFinanceTools

# Check if YFinanceTools is correctly imported by printing its type
print(type(YFinanceTools))

This error is showing:
*C:\Users\USER\PycharmProjects\AgentsTutorialPhiData.venv\Scripts\python.exe C:\Users\USER\PycharmProjects\AgentsTutorialPhiData\Sample.py *
Traceback (most recent call last):

  • File “C:\Users\USER\PycharmProjects\AgentsTutorialPhiData\Sample.py”, line 1, in *
  • from phi.tools.yfinance import YFinanceTools*
  • File “C:\Users\USER\PycharmProjects\AgentsTutorialPhiData.venv\Lib\site-packages\phi_init_.py”, line 8, in *
  • from . import builder*
  • File “C:\Users\USER\PycharmProjects\AgentsTutorialPhiData.venv\Lib\site-packages\phi\builder.py”, line 18, in *
  • from .utils import identity*
    ImportError: cannot import name ‘identity’ from ‘phi.utils’ (C:\Users\USER\PycharmProjects\AgentsTutorialPhiData.venv\Lib\site-packages\phi\utils_init_.py)

Process finished with exit code 1

Hi @GeorgyyVarghese
Thank you for reaching out and using Phidata! I’ve tagged the relevant engineers to assist you with your query. We aim to respond within 24 hours.
If this is urgent, please feel free to let us know, and we’ll do our best to prioritize it.
Thanks for your patience!

Hi @GeorgyyVarghese
Do you have the latest version of the phidata package? These errors don’t come from the current phidata package.