Closed rapcore2 closed 5 years ago
Hi @rapcore2, please try to update to version 0.5.0 and let me know if it worked (:
This issue has been automatically marked as stale because it has not had recent activity (14 days). It will be closed if no further activity occurs in the next 7 days. Thank you for your contributions.
This issue has been automatically closed because it has not had recent activity (21 days). Please reopen it if you feel that the issue not resolved yet.
I use CentOS Linux release 7.6.1810 with python 3.6 (python36-3.6.8-1.el7.x86_64 / python36-pip-8.1.2-8.el7.noarch). elasticsearch_loader was installed with pip (pip3.6 install elasticsearch_loader) with no errors.
On import tsv to elasticsearch i got:
elasticsearch_loader --type poland_geonames --index poland_geonames csv --delimiter="\t" poland_100.tsv {'type': 'poland_geonames', 'index': 'poland_geonames', 'bulk_size': 500, 'es_host': 'http://localhost:9200', 'verify_certs': False, 'use_ssl': False, 'ca_certs': None, 'http_auth': None, 'delete': False, 'update': False, 'progress': False, 'id_field': None, 'as_child': False, 'with_retry': False, 'index_settings_file': None, 'timeout': 10.0, 'encoding': 'utf-8', 'keys': [], 'es_conn': <Elasticsearch([{'host': 'localhost', 'port': 9200}])>} Traceback (most recent call last): File "/usr/local/bin/elasticsearch_loader", line 11, in <module> load_entry_point('elasticsearch-loader==0.4.0', 'console_scripts', 'elasticsearch_loader')() File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in __call__ return self.main(*args, **kwargs) File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/local/lib/python3.6/site-packages/elasticsearch_loader/__init__.py", line 130, in _csv lines = chain(*(csv.DictReader(x, delimiter=str(delimiter)) for x in files)) File "/usr/local/lib/python3.6/site-packages/elasticsearch_loader/__init__.py", line 130, in <genexpr> lines = chain(*(csv.DictReader(x, delimiter=str(delimiter)) for x in files)) File "/usr/lib64/python3.6/csv.py", line 87, in __init__ self.reader = reader(f, dialect, *args, **kwds) TypeError: "delimiter" must be a 1-character string
Sample file: sample_file.tsv.txt
Greetings!!!