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

astra extension import errors with Haystack v2.0.0-beta.5 #231

Closed
annthurium opened this issue Jan 17, 2024 · 1 comment
Closed

astra extension import errors with Haystack v2.0.0-beta.5 #231

annthurium opened this issue Jan 17, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@annthurium
Copy link

Describe the bug
When trying to import the AstraDocumentStore, I get an error:

from astra_haystack.document_store import AstraDocumentStore
[/usr/local/lib/python3.10/dist-packages/astra_haystack/document_store.py](https://localhost:8080/#) in <module>
     10 from haystack import default_from_dict, default_to_dict
     11 from haystack.dataclasses import Document
---> 12 from haystack.document_stores import (
     13     DuplicateDocumentError,
     14     DuplicatePolicy,

ImportError: cannot import name 'DuplicateDocumentError' from 'haystack.document_stores' (/usr/local/lib/python3.10/dist-packages/haystack/document_stores/__init__.py)

I think this is because in the beta.5 release, the folder configuration has changed and now errors and DuplicatePolicy are now under the errors and types sub-folders.

To Reproduce
Steps to reproduce the behavior. Feel free to link a Colab we can run to investigate the issue.
https://colab.research.google.com/drive/1WiRWYji4hbGGzuXZ_uTRagssOp4LbLga#scrollTo=A1iA_0dmXV3L
This colab requires a bunch of env variables to connect to Astra but since this error happens before the DB connection I think you can just put in dummy strings for those

Describe your environment (please complete the following information):

  • OS: MacOS Ventura 13.6.2
  • Haystack version: 2.0.0-beta5
  • Integration version: 0.1.0
@annthurium annthurium added the bug Something isn't working label Jan 17, 2024
@anakin87
Copy link
Member

Fixed in #235

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