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

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

Open
1 task done
danieldaeschle opened this issue Jan 20, 2025 · 4 comments
Open
1 task done

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

danieldaeschle opened this issue Jan 20, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@danieldaeschle
Copy link

danieldaeschle commented Jan 20, 2025

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?

  • I checked and didn't find similar issue

Are you willing to submit PR?

None

Copy link

dosubot bot commented Jan 20, 2025

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 dosubot bot added the bug Something isn't working label Jan 20, 2025
@danieldaeschle
Copy link
Author

everything is up to date.

@nirga
Copy link
Member

nirga commented Jan 20, 2025

Thanks @danieldaeschle - which weaviate version are you using?

@danieldaeschle
Copy link
Author

1.25.6 and 1.28.3
weaviate client 4.10.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants