openllmetry icon indicating copy to clipboard operation
openllmetry copied to clipboard

🐛 Bug Report: No module named 'weaviate.schema'

Open danieldaeschle opened this issue 10 months ago • 4 comments

Which component is this bug for?

Weaviate Instrumentation

📜 Description

File "...\model\api\api.py", line 54, in create_app
    WeaviateInstrumentor().instrument()
  File "...\venv\Lib\site-packages\opentelemetry\instrumentation\instrumentor.py", line 116, in instrument
    result = self._instrument(  # pylint: disable=assignment-from-no-return
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "...\venv\Lib\site-packages\opentelemetry\instrumentation\weaviate\__init__.py", line 231, in _instrument
    module = importlib.import_module(wrap_module)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\dd\AppData\Local\Programs\Python\Python311\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'weaviate.schema'

👟 Reproduction steps

weaviate-client==4.10.4

👍 Expected behavior

Work

👎 Actual Behavior with Screenshots

Crashes

🤖 Python Version

3.10

📃 Provide any additional context for the Bug.

No response

👀 Have you spent some time to check if this bug has been raised before?

  • [x] I checked and didn't find similar issue

Are you willing to submit PR?

None

danieldaeschle avatar Jan 20 '25 07:01 danieldaeschle

Hey @danieldaeschle! 👋 I'm here to help you with any bugs, questions, or contributions you have regarding Anthropic Instrumentation. I'm a bot designed to assist you while waiting for a human maintainer. Let me know how I can help!

The error "No module named 'weaviate.schema'" occurs because the weaviate.schema module is not available in the weaviate-client version 4.10.4. The WeaviateInstrumentor class in the OpenTelemetry instrumentation package attempts to import this module, but it seems to have been removed or renamed in the newer versions of the weaviate-client.

To resolve this issue, you can ensure that the WeaviateInstrumentor is using the alternative modules provided for newer versions of the weaviate-client. The WeaviateInstrumentor can use modules from the WRAPPED_METHODS_v4 list, such as weaviate.collections.collections and weaviate.collections.data, which are compatible with weaviate-client version 4.10.4 [1].

Make sure your OpenTelemetry instrumentation package is up to date and supports these alternative modules. If the issue persists, you might need to check if there are any updates or patches available for the OpenTelemetry instrumentation package that address this compatibility issue.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

dosubot[bot] avatar Jan 20 '25 07:01 dosubot[bot]

everything is up to date.

danieldaeschle avatar Jan 20 '25 08:01 danieldaeschle

Thanks @danieldaeschle - which weaviate version are you using?

nirga avatar Jan 20 '25 18:01 nirga

1.25.6 and 1.28.3 weaviate client 4.10.4

danieldaeschle avatar Jan 20 '25 18:01 danieldaeschle

Hi Running into the same issue and currently using a custom WRAPPED_METHOD as a patch. Any updates on this bug?

Tim-ty-tang avatar May 30 '25 08:05 Tim-ty-tang

Hey @Tim-ty-tang (and @danieldaeschle) - any chance you can paste a snippet that reproduces this issue? It will help us resolve this quicker

nirga avatar Jun 02 '25 05:06 nirga

I cannot remember this xD

danieldaeschle avatar Jun 02 '25 12:06 danieldaeschle