Skip to content

Header type problem #25

@hbarnard

Description

@hbarnard

Trying:

python csv2es.py --index-name test --doc-type test --import-file test.csv

gives:

Using host: http://127.0.0.1:9200/
Traceback (most recent call last):
  File "csv2es.py", line 215, in <module>
    cli()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 664, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 644, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 837, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 464, in invoke
    return callback(*args, **kwargs)
  File "csv2es.py", line 197, in cli
    es.create_index(index_name)
  File "/usr/local/lib/python2.7/dist-packages/pyelasticsearch/client.py", line 92, in decorate
    return func(*args, query_params=query_params, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pyelasticsearch/client.py", line 1005, in create_index
    query_params=query_params)
  File "/usr/local/lib/python2.7/dist-packages/pyelasticsearch/client.py", line 257, in send_request
    self._raise_exception(status, error_message)
  File "/usr/local/lib/python2.7/dist-packages/pyelasticsearch/client.py", line 271, in _raise_exception
    raise error_class(status, error_message)
pyelasticsearch.exceptions.ElasticHttpError: (406, u'Content-Type header [] is not supported')

I'm not an elasticsearch expert so, forgive me if this is something idiot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions