allenai / wimbd

What's In My Big Data (WIMBD) - a toolkit for analyzing large text datasets
Apache License 2.0
172 stars 18 forks source link

error after geting cloud_id and api_key #8

Closed WilliamsToTo closed 5 months ago

WilliamsToTo commented 6 months ago

I have obtained a cloud_id and an api_key. However, when attempting to execute the following code, I encountered errors. Do you know how to fix it?

`from wimbd.es import es_init, get_indices

es = es_init() print(get_indices(return_mapping=True))`

Error: Traceback (most recent call last): File "/home/taof/wimbd/search_test.py", line 4, in print(get_indices(return_mapping=True)) File "/home/taof/wimbd/wimbd/es/init.py", line 56, in get_indices indices = es.cat.indices(format="json") File "/home/taof/wimbd/env/lib/python3.9/site-packages/elasticsearch/_sync/client/utils.py", line 414, in wrapped return api(*args, **kwargs) File "/home/taof/wimbd/env/lib/python3.9/site-packages/elasticsearch/_sync/client/cat.py", line 701, in indices return self.perform_request( # type: ignore[return-value] File "/home/taof/wimbd/env/lib/python3.9/site-packages/elasticsearch/_sync/client/_base.py", line 389, in perform_request return self._client.perform_request( File "/home/taof/wimbd/env/lib/python3.9/site-packages/elasticsearch/_sync/client/_base.py", line 320, in perform_request raise HTTP_EXCEPTIONS.get(meta.status, ApiError)( elasticsearch.AuthorizationException: AuthorizationException(403, 'security_exception', 'action [cluster:monitor/state] is unauthorized for API key id [uDeV9IsBTffG4Z11VjJJ] of user [3344647685], this action is granted by the cluster privileges [read_ccr,transport_client,manage_ccr,monitor,manage,all]')

yanaiela commented 6 months ago

Hi William,

Since we provide restricted keys this shouldn't work.

We have three config files which gives access to:

If I've given you access to one of those, and you need access to another, please send me an email. If you need access to Dolma, there's another form you have to fill - link.

WilliamsToTo commented 6 months ago

Hi,

I have submitted a form for accessing Dolma. It would be great if you could provide keys.

yanaiela commented 5 months ago

Done.