Skip to content

cannot import name 'AggsProxy' from elasticsearch_dsl.search #314

Open
@selimt

Description

@selimt

When running on Python 3.9 with the latest elasticsearch_dsl release (8.13.0), we are getting the following traceback:

from django_elasticsearch_dsl_drf.filter_backends import (  # noqa: F401
  File "/usr/local/lib/python3.9/site-packages/django_elasticsearch_dsl_drf/filter_backends/__init__.py", line 29, in <module>
    from .suggester import (
  File "/usr/local/lib/python3.9/site-packages/django_elasticsearch_dsl_drf/filter_backends/suggester/__init__.py", line 5, in <module>
    from .functional import FunctionalSuggesterFilterBackend
  File "/usr/local/lib/python3.9/site-packages/django_elasticsearch_dsl_drf/filter_backends/suggester/functional.py", line 70, in <module>
    from elasticsearch_dsl.search import AggsProxy
ImportError: cannot import name 'AggsProxy' from 'elasticsearch_dsl.search' (/usr/local/lib/python3.9/site-packages/elasticsearch_dsl/search.py)

Pinning elasticsearch_dsl to 8.12.0 gets around the problem.

Thanks
-Selim

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions