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

ImportError: cannot import name 'AggsProxy' from 'elasticsearch_dsl.search' #1779

Closed
sadegh-khan opened this issue Apr 15, 2024 · 3 comments
Closed
Labels
Category: Bug Something isn't right Priority: High

Comments

@sadegh-khan
Copy link

after updating my django project i have this error:

ImportError: cannot import name 'AggsProxy' from 'elasticsearch_dsl.search' (/.local/lib/python3.10/site-packages/elasticsearch_dsl/search.py)

full error is:

 File "/aseman_refactor/places/serializers.py", line 4, in <module>
    from django_elasticsearch_dsl_drf.serializers import DocumentSerializer
  File "/.local/lib/python3.10/site-packages/django_elasticsearch_dsl_drf/serializers.py", line 36, in <module>
    from .utils import EmptySearch
  File "/.local/lib/python3.10/site-packages/django_elasticsearch_dsl_drf/utils.py", line 6, in <module>
    from elasticsearch_dsl.search import AggsProxy
ImportError: cannot import name 'AggsProxy' from 'elasticsearch_dsl.search' (/.local/lib/python3.10/site-packages/elasticsearch_dsl/search.py)
@pquentin
Copy link
Member

Linking to the corresponding issue in django-elasticsearch-dsl-drf: barseghyanartur/django-elasticsearch-dsl-drf#314

@pquentin
Copy link
Member

The next release of elasticsearch-dsl-py will provide an EmptySearch class (added in #1780) to allow django-elasticsearch-dsl-drf to use a more robust solution that does not depends on the internals of elasticsearch-dsl-py.

@miguelgrinberg
Copy link
Collaborator

Release 8.13.1 is out. To resolve this issue, the django-elasticsearch-dsl-drf project needs to integrate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Bug Something isn't right Priority: High
Projects
None yet
Development

No branches or pull requests

3 participants