o19s/solr-to-es

Content-Type header [] is not supported error

whisere opened this issue · 4 comments

I received the following error, but I thought this is fixed #5 ?
File "/usr/local/bin/solr-to-es", line 9, in
load_entry_point('solr-to-es==0.2.1', 'console_scripts', 'solr-to-es')()
File "build/bdist.linux-x86_64/egg/solr_to_es/main.py", line 81, in main
File "build/bdist.linux-x86_64/egg/elasticsearch/helpers/init.py", line 188, in bulk
File "build/bdist.linux-x86_64/egg/elasticsearch/helpers/init.py", line 160, in streaming_bulk
File "build/bdist.linux-x86_64/egg/elasticsearch/helpers/init.py", line 89, in _process_bulk_chunk
elasticsearch.exceptions.TransportError: TransportError(406, u'Content-Type header [] is not supported')
Thanks.

solr json response has the following content-type

Content-Type | application/json; charset=UTF-8

epugh commented

Me too! a PR would be great.

I have solved it by
running:
pip install -U elasticsearch

change the setup.py from
install_requires=['elasticsearch>=1.6.0,<2.0',
'pysolr>=3.3.2,<4.0'],
to
install_requires=['elasticsearch>=6.2.0',
'pysolr>=3.3.2,<4.0'],

and then run 'python setup.py install' again

epugh commented

Looks like this was fixed, so going to close. Thank you! Please reopen if you see differently.