Bug: Error when trying to create a project with multiple Crews
I created a project that would have two crews, one called BoardCrew and another called DataOpsCrew, using the new decorators from the latest version. When he started to install and run the first crew, I received the following error:
File "/home/wagner/projects/driva/driva-crew-ai/.venv/lib/python3.10/site-packages/crewai/project/annotations.py", line 23, in wrapper
possible_task = getattr(self, task_name)
AttributeError: 'WrappedClass' object has no attribute 'sql_developer_task'
Looking at the source code, I discovered that it is because it tries to fetch the sql_developer_task from the other crew in the wrapper. This generates the error, since the getattr function returns an error when we do not define a default value. In this case I changed from getattr(self, task_name) to getattr(self, task_name, None).
I am facing the same issue with multiple crews. defaulting the getattr to None like you stated worked!
Same issue here.
Facing the same issue . @wagnerdriva - using your workaround of getattr(self, task_name, None) for now. Thanks
I think we now fixed this in main, would you folks mind double checking this in case?
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.