Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hierarchical processes with custom manager with no agent assignment on task causes an error #366

Closed
andrewn3 opened this issue Dec 3, 2024 · 3 comments · Fixed by Scale3-Labs/langtrace-python-sdk#422

Comments

@andrewn3
Copy link

andrewn3 commented Dec 3, 2024

When you define a Hierarchical processes you don't need to specify on the task if it's assigned to an agent as you can let the manager or custom manager do this. I created a custom manager agent and assigned it to "manager=" as part of the crew definition and the left the task with no assigned agents as the manager would choose and the langtrace python sdk will fail.

This flagged this error

File "D:\Users\xxxx\crewai\xxxx\xxx\xxx.venv\Lib\site-packages*langtrace_python_sdk\instrumentation\crewai\patch.py", line 226, in _parse_tasks*
"agent": task.agent.role,**
^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'role'

i did a crude fix just to get it working e.g. "agent": task.agent.role if task.agent else None

@karthikscale3
Copy link
Contributor

Hi @andrewn3 , thanks for reporting. We will have a fix for it shortly.

@alizenhom
Copy link
Collaborator

@andrewn3 Nice catch, this now fixed and released in 3.3.12 kindly update to 3.3.12 and will be more than happy if you still face any issues

@andrewn3
Copy link
Author

andrewn3 commented Dec 4, 2024

Works fine with 3.3.12.

@andrewn3 andrewn3 closed this as completed Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants