DataFrame(serverless_client) fails with TypeError: 'Elasticsearch' object is not iterable
#686
Labels
good first issue
Good for newcomers
Nick C on the Community Slack reported a bug when using
DataFrame
with an existing serverless Elasticsearch Python client.This fails with
TypeError: 'Elasticsearch' object is not iterable
becauseensure_es_client
tries to wrap the client in another one:eland/eland/common.py
Lines 307 to 314 in 9cea238
The fix is probably to switch the
isinstance
check to check for str/list[str] instead of trying to check that it's not a client.The workaround is to either pass connection data to DataFrame directly, or pass it a standard Elasticsearch client (useful to set credentials or other options).
The text was updated successfully, but these errors were encountered: