Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.
While running the crewai command from the terminal, I encountered a TypeError that suggests the descriptors cannot be created directly. The error message indicates that the issue may be due to outdated generated code, which needs to be regenerated with protoc version 3.19.0 or higher.
The error occurred when importing the OTLPSpanExporter from opentelemetry.exporter.otlp.proto.http.trace_exporter. The traceback suggests that the error originates from the google.protobuf.descriptor module, which is used by the opentelemetry.proto.common.v1.common_pb2 module.
The exact error message is as follows:
TypeError: Descriptors cannot be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
This issue prevents the use of the crewai command and potentially affects other parts of the system that rely on the same protobuf package or protoc compiler.
Note: I believe the issue comes when installing the crewai-tools from source (main branch at 04/10/2024). There is a different protobuf version installed in that version of crewai-tools.
Observation: Current version on GitHub is 0.65.2 while the official pypi version is 0.67.1. Why the discrepancy ?
Steps to Reproduce
Create conda env with python 3.11 and activate it
Install crewai from source (tag:0.65.2) using poetry install
Install crewai-tools (main at 04/10/2024) using poetry install
Execute crewai -v
Expected behavior
Help pannel of crewai, something like this:
Usage: crewai [OPTIONS] COMMAND [ARGS]...
Top-level command group for crewai.
Options:
--help Show this message and exit.
Commands:
create Create a new crew, pipeline, or flow.
deploy Deploy the Crew CLI group.
flow Flow related commands.
install Install the Crew.
log-tasks-outputs Retrieve your latest crew.kickoff() task outputs.
login Sign Up/Login to CrewAI+.
replay Replay the crew execution from a specific task.
reset-memories Reset the crew memories (long, short, entity,...
run Run the Crew.
signup Sign Up/Login to CrewAI+.
test Test the crew and evaluate the results.
tool Tool Repository related commands.
train Train the crew.
version Show the installed version of crewai.
Screenshots/Code snippets
Operating System
Ubuntu 20.04
Python Version
3.11
crewAI Version
0.65.2
crewAI Tools Version
0.12.1
Virtual Environment
Conda
Evidence
TypeError: Descriptors cannot be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
Description
While running the crewai command from the terminal, I encountered a TypeError that suggests the descriptors cannot be created directly. The error message indicates that the issue may be due to outdated generated code, which needs to be regenerated with protoc version 3.19.0 or higher.
The error occurred when importing the OTLPSpanExporter from opentelemetry.exporter.otlp.proto.http.trace_exporter. The traceback suggests that the error originates from the google.protobuf.descriptor module, which is used by the opentelemetry.proto.common.v1.common_pb2 module.
The exact error message is as follows:
This issue prevents the use of the crewai command and potentially affects other parts of the system that rely on the same protobuf package or protoc compiler.
Note: I believe the issue comes when installing the crewai-tools from source (main branch at 04/10/2024). There is a different protobuf version installed in that version of
crewai-tools
. Observation: Current version on GitHub is 0.65.2 while the official pypi version is 0.67.1. Why the discrepancy ?Steps to Reproduce
poetry install
poetry install
Expected behavior
Help pannel of crewai, something like this:
Screenshots/Code snippets
Operating System
Ubuntu 20.04
Python Version
3.11
crewAI Version
0.65.2
crewAI Tools Version
0.12.1
Virtual Environment
Conda
Evidence
Possible Solution
None
Additional context
N/A