bennylope / elasticstack

:card_index: Configurable indexing and other extras for Haystack (with ElasticSearch biases)
BSD 2-Clause "Simplified" License
127 stars 31 forks source link

AttributeError: 'ElasticSearch' object has no attribute 'from_python' #1

Closed bashu closed 11 years ago

bashu commented 11 years ago

Hey,

Got this with django-haystack==2.1 and pyelasticsearch==0.6

[vagrant@172.16.55.182:22] run: /var/www/example.co/virtualenv/bin/python /var/www/example.co/djangoapp/manage.py show_document classifieds.Ad 453 --settings=base.settings.vagrant
[vagrant@172.16.55.182:22] out: Raven is not configured (logging is disabled). Please see the documentation for more information.
[vagrant@172.16.55.182:22] out: Traceback (most recent call last):
[vagrant@172.16.55.182:22] out:   File "/var/www/example.co/djangoapp/manage.py", line 10, in <module>
[vagrant@172.16.55.182:22] out:     execute_from_command_line(sys.argv)
[vagrant@172.16.55.182:22] out:   File "/var/www/example.co/virtualenv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
[vagrant@172.16.55.182:22] out:     utility.execute()
[vagrant@172.16.55.182:22] out:   File "/var/www/example.co/virtualenv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
[vagrant@172.16.55.182:22] out:     self.fetch_command(subcommand).run_from_argv(self.argv)
[vagrant@172.16.55.182:22] out:   File "/var/www/example.co/virtualenv/local/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
[vagrant@172.16.55.182:22] out:     self.execute(*args, **options.__dict__)
[vagrant@172.16.55.182:22] out:   File "/var/www/example.co/virtualenv/local/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
[vagrant@172.16.55.182:22] out:     output = self.handle(*args, **options)
[vagrant@172.16.55.182:22] out:   File "/var/www/example.co/virtualenv/local/lib/python2.7/site-packages/elasticstack/management/commands/show_document.py", line 32, in handle
[vagrant@172.16.55.182:22] out:     doc_json = prepare_object(obj, options.get('using'))
[vagrant@172.16.55.182:22] out:   File "/var/www/example.co/virtualenv/local/lib/python2.7/site-packages/elasticstack/utils.py", line 16, in prepare_object
[vagrant@172.16.55.182:22] out:     final_data[key] = connections[using].get_backend().conn.from_python(value)
[vagrant@172.16.55.182:22] out: AttributeError: 'ElasticSearch' object has no attribute 'from_python'
[vagrant@172.16.55.182:22] out: