You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to run pytest on crewAI-tools, encounter this error. I suspect it has to do with chromadb versioning, it is calling out the auto-generated files from protobuff.
(crewai-tools-py3.12) (base) bisansuleiman@Bisans-MacBook-Pro crewAI-tools % poetry run pytest
======================================= test session starts ========================================
platform darwin -- Python 3.12.4, pytest-8.3.2, pluggy-1.5.0
rootdir: /Users/bisansuleiman/crewAI-tools
configfile: pyproject.toml
plugins: anyio-4.4.0
collected 2 items / 3 errors
============================================== ERRORS ==============================================
_____________________________ ERROR collecting tests/base_tool_test.py _____________________________
tests/base_tool_test.py:2: in <module>
from crewai_tools import BaseTool, tool
crewai_tools/__init__.py:1: in <module>
from .tools import (
crewai_tools/tools/__init__.py:2: in <module>
from .code_docs_search_tool.code_docs_search_tool import CodeDocsSearchTool
crewai_tools/tools/code_docs_search_tool/code_docs_search_tool.py:3: in <module>
from embedchain.models.data_type import DataType
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/embedchain/__init__.py:5: in <module>
from embedchain.app import App # noqa: F401
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/embedchain/app.py:22: in <module>
from embedchain.config import AppConfig, CacheConfig, ChunkerConfig, Mem0Config
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/embedchain/config/__init__.py:4: in <module>
from .app_config import AppConfig
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/embedchain/config/app_config.py:5: in <module>
from .base_app_config import BaseAppConfig
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/embedchain/config/base_app_config.py:6: in <module>
from embedchain.vectordb.base import BaseVectorDB
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/embedchain/vectordb/base.py:2: in <module>
from embedchain.embedder.base import BaseEmbedder
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/embedchain/embedder/base.py:7: in <module>
from chromadb.api.types import Embeddable, EmbeddingFunction, Embeddings
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/chromadb/__init__.py:5: in <module>
from chromadb.auth.token import TokenTransportHeader
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/chromadb/auth/token/__init__.py:26: in <module>
from chromadb.telemetry.opentelemetry import (
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/chromadb/telemetry/opentelemetry/__init__.py:11: in <module>
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/opentelemetry/exporter/otlp/proto/grpc/trace_exporter/__init__.py:22: in <module>
from opentelemetry.exporter.otlp.proto.grpc.exporter import (
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/opentelemetry/exporter/otlp/proto/grpc/exporter.py:39: in <module>
from opentelemetry.proto.common.v1.common_pb2 import (
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/opentelemetry/proto/common/v1/common_pb2.py:36: in <module>
_descriptor.FieldDescriptor(
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/google/protobuf/descriptor.py:621: in __new__
_message.Message._CheckCalledFromGeneratedFile()
E TypeError: Descriptors cannot be created directly.
E 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.
E If you cannot immediately regenerate your protos, some other possible workarounds are:
E 1. Downgrade the protobuf package to 3.20.x or lower.
E 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
E
E More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
____________________________ ERROR collecting tests/spider_tool_test.py ____________________________
tests/spider_tool_test.py:1: in <module>
from crewai_tools.tools.spider_tool.spider_tool import SpiderTool
crewai_tools/__init__.py:1: in <module>
from .tools import (
crewai_tools/tools/__init__.py:2: in <module>
from .code_docs_search_tool.code_docs_search_tool import CodeDocsSearchTool
crewai_tools/tools/code_docs_search_tool/code_docs_search_tool.py:3: in <module>
from embedchain.models.data_type import DataType
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/embedchain/__init__.py:5: in <module>
from embedchain.app import App # noqa: F401
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/embedchain/app.py:38: in <module>
from embedchain.vectordb.chroma import ChromaDB
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/embedchain/vectordb/chroma.py:4: in <module>
from chromadb import Collection, QueryResult
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/chromadb/__init__.py:5: in <module>
from chromadb.auth.token import TokenTransportHeader
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/chromadb/auth/token/__init__.py:26: in <module>
from chromadb.telemetry.opentelemetry import (
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/chromadb/telemetry/opentelemetry/__init__.py:11: in <module>
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/opentelemetry/exporter/otlp/proto/grpc/trace_exporter/__init__.py:22: in <module>
from opentelemetry.exporter.otlp.proto.grpc.exporter import (
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/opentelemetry/exporter/otlp/proto/grpc/exporter.py:39: in <module>
from opentelemetry.proto.common.v1.common_pb2 import (
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/opentelemetry/proto/common/v1/common_pb2.py:36: in <module>
_descriptor.FieldDescriptor(
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/google/protobuf/descriptor.py:621: in __new__
_message.Message._CheckCalledFromGeneratedFile()
E TypeError: Descriptors cannot be created directly.
E 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.
E If you cannot immediately regenerate your protos, some other possible workarounds are:
E 1. Downgrade the protobuf package to 3.20.x or lower.
E 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
E
E More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
________________________ ERROR collecting tests/tools/rag/rag_tool_test.py _________________________
tests/tools/rag/rag_tool_test.py:8: in <module>
from crewai_tools.adapters.embedchain_adapter import EmbedchainAdapter
crewai_tools/adapters/embedchain_adapter.py:3: in <module>
from embedchain import App
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/embedchain/__init__.py:5: in <module>
from embedchain.app import App # noqa: F401
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/embedchain/app.py:38: in <module>
from embedchain.vectordb.chroma import ChromaDB
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/embedchain/vectordb/chroma.py:4: in <module>
from chromadb import Collection, QueryResult
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/chromadb/__init__.py:5: in <module>
from chromadb.auth.token import TokenTransportHeader
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/chromadb/auth/token/__init__.py:26: in <module>
from chromadb.telemetry.opentelemetry import (
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/chromadb/telemetry/opentelemetry/__init__.py:11: in <module>
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/opentelemetry/exporter/otlp/proto/grpc/trace_exporter/__init__.py:22: in <module>
from opentelemetry.exporter.otlp.proto.grpc.exporter import (
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/opentelemetry/exporter/otlp/proto/grpc/exporter.py:39: in <module>
from opentelemetry.proto.common.v1.common_pb2 import (
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/opentelemetry/proto/common/v1/common_pb2.py:36: in <module>
_descriptor.FieldDescriptor(
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/google/protobuf/descriptor.py:621: in __new__
_message.Message._CheckCalledFromGeneratedFile()
E TypeError: Descriptors cannot be created directly.
E 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.
E If you cannot immediately regenerate your protos, some other possible workarounds are:
E 1. Downgrade the protobuf package to 3.20.x or lower.
E 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
E
E More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
========================================= warnings summary =========================================
crewai_tools/tools/base_tool.py:28
/Users/bisansuleiman/crewAI-tools/crewai_tools/tools/base_tool.py:28: PydanticDeprecatedSince20: Pydantic V1 style `@validator` validators are deprecated. You should migrate to Pydantic V2 style `@field_validator` validators, see the migration guide for more details. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.8/migration/
@validator("args_schema", always=True, pre=True)
../Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-py3.12/lib/python3.12/site-packages/pydantic/_internal/_config.py:291
/Users/bisansuleiman/Library/Caches/pypoetry/virtualenvs/crewai-tools-yNAtfOkF-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 tests/base_tool_test.py - TypeError: Descriptors cannot be created directly.
ERROR tests/spider_tool_test.py - TypeError: Descriptors cannot be created directly.
ERROR tests/tools/rag/rag_tool_test.py - TypeError: Descriptors cannot be created directly.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================== 2 warnings, 3 errors in 4.05s ===================================
(crewai-tools-py3.12) (base) bisansuleiman@Bisans-MacBook-Pro crewAI-tools %
The text was updated successfully, but these errors were encountered:
Trying to run pytest on crewAI-tools, encounter this error. I suspect it has to do with chromadb versioning, it is calling out the auto-generated files from protobuff.
The text was updated successfully, but these errors were encountered: