Unstructured-IO / unstructured-ingest

Apache License 2.0
15 stars 14 forks source link

bug/elasticsearch connector broken on auth strategies other than username/password #70

Open rbiseck3 opened 7 months ago

rbiseck3 commented 7 months ago

Describe the bug When anything other than basic auth (username/password) is used, the client instantiation breaks because the username field from the access config isn't dropped, causing the following error:

TypeError: Elasticsearch.__init__() got an unexpected keyword argument 'username'

To Reproduce Create the elasticsearch connector and set the access configs using api key data. Run check_connection() on it will reproduce this error.

Fix To fix, all that should be needed is adding d.pop("api_key_id", None) after this line: unstructured/ingest/connector/elasticsearch.py#L69

aag6z commented 4 months ago

I hit this issue as well while trying to use cloud_id and an API key. Would be great to have a fix!