gpt4 book ai didi

python - 请求错误: TransportError(400, 'parse_exception', 'No processor type exists with name[attachment]')

转载 作者:太空宇宙 更新时间:2023-11-03 15:27:02 24 4
gpt4 key购买 nike

我正在尝试创建一个管道以在 python 客户端中使用摄取附件处理器插件,如下所示:

 from elasticsearch import Elasticsearch
es = Elasticsearch()
body = {
"description" : "Extract attachment information",
"processors" : [
{
"attachment" : {
"field" : "data"
}
}
]
}
es.index(index='_ingest', doc_type='pipeline', id='attachment', body=body)

执行此操作时,我收到以下错误:

---------------------------------------------------------------------------
RequestError Traceback (most recent call last)
<ipython-input-32-dcd3f26dc39d> in <module>()
----> 1 es.index(index='_ingest', doc_type='pipeline', id='attachment', body=body)

C:\Users\ananda\AppData\Local\Continuum\Anaconda3\lib\site- packages\elasticsearch\client\utils.py in _wrapped(*args, **kwargs)
71 if p in kwargs:
72 params[p] = kwargs.pop(p)
---> 73 return func(*args, params=params, **kwargs)
74 return _wrapped
75 return _wrapper

C:\Users\ananda\AppData\Local\Continuum\Anaconda3\lib\site- packages\elasticsearch\client\__init__.py in index(self, index, doc_type, body, id, params)
298 raise ValueError("Empty value passed for a required argument.")
299 return self.transport.perform_request('POST' if id in SKIP_IN_PATH else 'PUT',
--> 300 _make_path(index, doc_type, id), params=params, body=body)
301
302 @query_params('parent', 'preference', 'realtime', 'refresh', 'routing')

C:\Users\ananda\AppData\Local\Continuum\Anaconda3\lib\site-packages\elasticsearch\transport.py in perform_request(self, method, url, params, body)
316
317 try:
--> 318 status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
319
320 except TransportError as e:

C:\Users\ananda\AppData\Local\Continuum\Anaconda3\lib\site-packages\elasticsearch\connection\http_urllib3.py in perform_request(self, method, url, params, body, timeout, ignore)
126 if not (200 <= response.status < 300) and response.status not in ignore:
127 self.log_request_fail(method, full_url, url, body, duration, response.status, raw_data)
--> 128 self._raise_error(response.status, raw_data)
129
130 self.log_request_success(method, full_url, url, body, response.status,

C:\Users\ananda\AppData\Local\Continuum\Anaconda3\lib\site-packages\elasticsearch\connection\base.py in _raise_error(self, status_code, raw_data)
120 logger.warning('Undecodable raw error response from server: %s', err)
121
--> 122 raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
123
124

RequestError: TransportError(400, 'parse_exception', 'No processor type exists with name [attachment]')

我的 ES 已启动并正在运行:

es.cat.health()
'1490674396 09:43:16 elasticsearch green 1 1 0 0 0 0 0 0 - 100.0%\n'

奇怪的是,我在 ES 日志中看不到任何内容:

[2017-03-28T09:49:01,960][INFO ][o.e.n.Node               ] version[5.2.0],   pid[12692], build[24e05b9/2017-01-24T19:52:35.800Z], OS[Windows 10/10.0/amd64],   JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_111/25.111-b14]
[2017-03-28T09:49:03,132][INFO ][o.e.p.PluginsService ] [R8e0KZa] loaded module [aggs-matrix-stats]
[2017-03-28T09:49:03,132][INFO ][o.e.p.PluginsService ] [R8e0KZa] loaded module [ingest-common]
[2017-03-28T09:49:03,132][INFO ][o.e.p.PluginsService ] [R8e0KZa] loaded module [lang-expression]
[2017-03-28T09:49:03,132][INFO ][o.e.p.PluginsService ] [R8e0KZa] loaded module [lang-groovy]
[2017-03-28T09:49:03,132][INFO ][o.e.p.PluginsService ] [R8e0KZa] loaded module [lang-mustache]
[2017-03-28T09:49:03,132][INFO ][o.e.p.PluginsService ] [R8e0KZa] loaded module [lang-painless]
[2017-03-28T09:49:03,132][INFO ][o.e.p.PluginsService ] [R8e0KZa] loaded module [percolator]
[2017-03-28T09:49:03,132][INFO ][o.e.p.PluginsService ] [R8e0KZa] loaded module [reindex]
[2017-03-28T09:49:03,132][INFO ][o.e.p.PluginsService ] [R8e0KZa] loaded module [transport-netty3]
[2017-03-28T09:49:03,147][INFO ][o.e.p.PluginsService ] [R8e0KZa] loaded module [transport-netty4]
[2017-03-28T09:49:03,147][INFO ][o.e.p.PluginsService ] [R8e0KZa] no plugins loaded
[2017-03-28T09:49:06,768][INFO ][o.e.n.Node ] initialized
[2017-03-28T09:49:06,768][INFO ][o.e.n.Node ] [R8e0KZa] starting ...
[2017-03-28T09:49:08,294][INFO ][o.e.t.TransportService ] [R8e0KZa] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}, {[::1]:9300}
[2017-03-28T09:49:11,391][INFO ][o.e.c.s.ClusterService ] [R8e0KZa] new_master {R8e0KZa}{R8e0KZacS_WD0BsOnVTK8Q}{AiE29E1xRBasGeaqmONqvQ}{127.0.0.1} {127.0.0.1:9300}, reason: zen-disco-elected-as-master ([0] nodes joined)
[2017-03-28T09:49:11,459][INFO ][o.e.g.GatewayService ] [R8e0KZa] recovered [0] indices into cluster_state
[2017-03-28T09:49:12,745][INFO ][o.e.h.HttpServer ] [R8e0KZa] publish_address {127.0.0.1:9200}, bound_addresses {127.0.0.1:9200}, {[::1]:9200}
[2017-03-28T09:49:12,745][INFO ][o.e.n.Node ] [R8e0KZa] started

请帮我指出这里出了什么问题......

最佳答案

你得到的错误在最后一行

No processor type exists with name [attachment]

您需要install the attachment plugin首先要使用它

sudo bin/elasticsearch-plugin install ingest-attachment

然后重启ES就可以了。

关于python - 请求错误: TransportError(400, 'parse_exception', 'No processor type exists with name[attachment]'),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43060641/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com