Open rmico77 opened 1 month ago
What version of CrewAI are you using?
What version of CrewAI are you using?
the last one ( v0.36.0 ). I noticed this error after new updates..
Interestingly, I installed v0.35.0 and it apparently returned to normal...
Also encountering it in 0.36.0 release. Verbose output below:
================================================================================================================================================================================================================================= test session starts =================================================================================================================================================================================================================================
platform darwin -- Python 3.12.4, pytest-8.2.2, pluggy-1.5.0 -- /Users/datadir/Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/bin/python
cachedir: .pytest_cache
rootdir: /Users/datadir/dev/python/workflows
configfile: pyproject.toml
testpaths: tests, src/crewai
plugins: vcr-1.0.2, anyio-4.4.0
collected 80 items / 2 errors
======================================================================================================================================================================================================================================= ERRORS ========================================================================================================================================================================================================================================
__________________________________________________________________________________________________________________________________________________________________________________________________________ ERROR collecting src/crewai/tests/agent_tools/agent_tools_test.py __________________________________________________________________________________________________________________________________________________________________________________________________________
src/crewai/tests/agent_tools/agent_tools_test.py:8: in <module>
researcher = Agent(
../../../Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/agentops/agent.py:25: in new_init
raise e
../../../Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/agentops/agent.py:19: in new_init
original_init(self, *args, **kwargs)
../../../Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/crewai/agent.py:102: in __init__
super().__init__(**config, **data)
../../../Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/crewai/agents/agent_builder/base_agent.py:128: in __init__
super().__init__(**config, **data)
../../../Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/crewai/agent.py:125: in set_agent_executor
agentops.stop_instrumenting()
../../../Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/agentops/__init__.py:144: in stop_instrumenting
Client().stop_instrumenting()
../../../Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/agentops/meta_client.py:56: in wrapper
raise e
../../../Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/agentops/meta_client.py:49: in wrapper
return method(self, *args, **kwargs)
../../../Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/agentops/client.py:425: in stop_instrumenting
if self.llm_tracker:
E AttributeError: 'Client' object has no attribute 'llm_tracker'
___________________________________________________________________________________________________________________________________________________________________________________________________________________ ERROR collecting src/crewai/tests/crew_test.py ____________________________________________________________________________________________________________________________________________________________________________________________________________________
src/crewai/tests/crew_test.py:18: in <module>
ceo = Agent(
../../../Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/agentops/agent.py:25: in new_init
raise e
../../../Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/agentops/agent.py:19: in new_init
original_init(self, *args, **kwargs)
../../../Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/crewai/agent.py:102: in __init__
super().__init__(**config, **data)
../../../Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/crewai/agents/agent_builder/base_agent.py:128: in __init__
super().__init__(**config, **data)
../../../Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/crewai/agent.py:125: in set_agent_executor
agentops.stop_instrumenting()
../../../Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/agentops/__init__.py:144: in stop_instrumenting
Client().stop_instrumenting()
../../../Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/agentops/meta_client.py:56: in wrapper
raise e
../../../Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/agentops/meta_client.py:49: in wrapper
return method(self, *args, **kwargs)
../../../Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/agentops/client.py:425: in stop_instrumenting
if self.llm_tracker:
E AttributeError: 'Client' object has no attribute 'llm_tracker'
================================================================================================================================================================================================================================== warnings summary ===================================================================================================================================================================================================================================
<frozen importlib._bootstrap>:488
<frozen importlib._bootstrap>:488: DeprecationWarning: Type google._upb._message.MessageMapContainer uses PyType_Spec with a metaclass that has custom tp_new. This is deprecated and will no longer be allowed in Python 3.14.
<frozen importlib._bootstrap>:488
<frozen importlib._bootstrap>:488: DeprecationWarning: Type google._upb._message.ScalarMapContainer uses PyType_Spec with a metaclass that has custom tp_new. This is deprecated and will no longer be allowed in Python 3.14.
../../../Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/crewai/telemetry/telemetry.py:9
/Users/datadir/Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/crewai/telemetry/telemetry.py:9: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
../../../Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/pkg_resources/__init__.py:3117
/Users/datadir/Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/pkg_resources/__init__.py:3117: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
../../../Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/pkg_resources/__init__.py:3117
/Users/datadir/Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/pkg_resources/__init__.py:3117: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
../../../Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/pkg_resources/__init__.py:2529
/Users/datadir/Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/pkg_resources/__init__.py:2529: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(parent)
../../../Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/pydantic/_internal/_config.py:291
/Users/datadir/Library/Caches/pypoetry/virtualenvs/workflows-jbmX4TMD-py3.12/lib/python3.12/site-packages/pydantic/_internal/_config.py:291: PydanticDeprecatedSince20: Support for class-based `config` is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.8/migration/
warnings.warn(DEPRECATION_MESSAGE, DeprecationWarning)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=============================================================================================================================================================================================================================== short test summary info ===============================================================================================================================================================================================================================
ERROR src/crewai/tests/agent_tools/agent_tools_test.py - AttributeError: 'Client' object has no attribute 'llm_tracker'
ERROR src/crewai/tests/crew_test.py - AttributeError: 'Client' object has no attribute 'llm_tracker'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================================================================================================================================================================ 7 warnings, 2 errors in 3.30s ============================================================================================================================================================================================================================
any update on this one?
same problem here
@dav-mf downgrading back to v0.35.0 worked for me
v0.36.0:
Adding AgentOps native support
try to add env AGENTOPS_API_KEY --or-- uninstall crewai[agentops] if you not using that.. for test - you can set even some dummy value like '0' for AGENTOPS_API_KEY and that should prevent this error.
@AbubakrChan This worked for me. Thanks I was also getting crashes from Agentops. @azdolinski What does native support involve?
I tested it in the new v0.41.1 and the problem returned. What happened after v0.35.8 ? @joaomdmoura
I tested it in the new v0.41.1 and the problem returned. What happened after v0.35.8 ? @joaomdmoura
As @azdolinski said earlier. In v0.36.0+ AgentOps native support has been added. If you are not using AgentOps then you should remove agentops from project.
Is there currently a valid combination of agentops and crewai that can be used without an error? I have tried several combinations and none of them worked - with the most recent versions throwing
AttributeError: 'Client' object has no attribute 'llm_tracker'
and older versions throwing:
File "/usr/local/lib/python3.11/site-packages/crewai/agents/executor.py", line 135, in _iter_next_step \n output = self.agent.plan( # type: ignore # Incompatible types in assignment (expression has type "AgentAction | AgentFinish | list[AgentAction]", variable has type "AgentAction")
Try to activate your prepared environment, remove the agentops module, deactivate and start again
source ./venv/bin/activate pip uninstall agentops -Y deactivate ./run_venv.sh
In my case, this fixes for the moment the kickoff without agentops support in crewai-studio. Happy weekend.