Skip to content

Cannot import name 'DocTypeMeta' #119

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

Closed
deft01 opened this issue Jul 8, 2018 · 5 comments
Closed

Cannot import name 'DocTypeMeta' #119

deft01 opened this issue Jul 8, 2018 · 5 comments

Comments

@deft01
Copy link

deft01 commented Jul 8, 2018

Working with python3 (3.5.3).
Last django release (2.0.7).
Last release of django_elasticsearch_dsl (cloned).

Idk what the mistake is...

In [1]: import django_elasticsearch_dsl
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-43bb12786d78> in <module>()
----> 1 import django_elasticsearch_dsl

/usr/local/lib/python3.5/dist-packages/django_elasticsearch_dsl/__init__.py in <module>()
      1 from django.utils.module_loading import autodiscover_modules
      2 
----> 3 from .documents import DocType  # noqa
      4 from .indices import Index  # noqa
      5 from .fields import *  # noqa

/usr/local/lib/python3.5/dist-packages/django_elasticsearch_dsl/documents.py in <module>()
      6 from elasticsearch.helpers import bulk
      7 from elasticsearch_dsl import DocType as DSLDocType
----> 8 from elasticsearch_dsl.document import DocTypeMeta as DSLDocTypeMeta
      9 from elasticsearch_dsl.field import Field
     10 

ImportError: cannot import name 'DocTypeMeta'```
@DusanMadar
Copy link

DusanMadar commented Jul 10, 2018

It's because of a fairly recent breaking change to elasticsearch_dsl (http://elasticsearch-dsl.readthedocs.io/en/latest/Changelog.html#id3).

Installing the previous version works for me; pip install elasticsearch-dsl==6.1.0. Of course, this should be only a temporary workaround.

@deft01
Copy link
Author

deft01 commented Jul 10, 2018

I will try this evening and give a feedback. Thx for helping !

@jaddison
Copy link

Duplicate of #115.

isaacm added a commit to tonytan4ever/concordia that referenced this issue Aug 20, 2018
At the moment the latest version of django-elasticsearch-dsl
is broken due to a depedency.

See django-es/django-elasticsearch-dsl#119
@safwanrahman
Copy link
Collaborator

Closing this as its already issued in #115

@shasha88
Copy link

Hi guys,
I am trying to connect to elasticsearch using django-elasticsearch-dsl.
But, this error keeps coming. I tried downgrading elasticsearch-dsl. but it didnot work

I am using python 3.7. do you think there is compatibility issues?
Thanks
error.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants