Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elasticsearch Connection Sending Unexpected Key #24

Open
cgivre opened this issue Nov 20, 2023 · 1 comment
Open

Elasticsearch Connection Sending Unexpected Key #24

cgivre opened this issue Nov 20, 2023 · 1 comment

Comments

@cgivre
Copy link

cgivre commented Nov 20, 2023

Describe the bug
I just installed huntlib and attempted to connect to Elasticsearch.

To Reproduce

es_connection = ElasticDF(
                url="https://localhost:9200"
)

Results in:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[20], line 1
----> 1 es_connection = ElasticDF(
      2                 url="https://localhost:9200/"
      3 )

File ~/anaconda3/lib/python3.11/site-packages/huntlib/elastic.py:60, in ElasticDF.__init__(self, url, timeout, ssl, username, password, verify_certs, ca_certs)
     55 def __init__(self, url=None, timeout=250, ssl=False, username="", password="", verify_certs=True, ca_certs=None):
     56     '''
     57     Create the ElasticDF object and log into the Elastic server.
     58     '''
---> 60     self.es_conn = Elasticsearch(
     61         url,
     62         timeout=timeout,
     63         use_ssl=ssl,
     64         verify_certs=verify_certs,
     65         ca_certs=ca_certs,
     66         http_auth=(username, password)
     67     )

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

Expected behavior
I would have expected huntlib to create an ES connection.

Desktop (please complete the following information):
macOS Sonoma.

@cgivre
Copy link
Author

cgivre commented Nov 20, 2023

I suspect the cause of this issue is an update in the underlying Elasticsearch dependency. We could either fix this by fixing the version of the ES module or modifying the constructor in huntlib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant