Skip to content

Version 7.0.1: Getting ConnectionError(a float is required) when passing request_timeout in the client calls #969

Closed
@jyothikp

Description

@jyothikp

I am using the version 7.0.1 and getting this error when passing the request_timeout in client calls:
es.indices.delete_template(
name=template_name,
master_timeout="60s",
request_timeout= 90
)
Traceback (most recent call last): \n File "<ipython-input-13-d6617379fbe8>", line 4, in <module> \n request_timeout=template_timeouts.get(\'request_timeout_secs\', 90) \n File "build/bdist.linux-x86_64/egg/elasticsearch/client/utils.py", line 84, in _wrapped \n return func(*args, params=params, **kwargs) \n File "build/bdist.linux-x86_64/egg/elasticsearch/client/indices.py", line 607, in delete_template \n "DELETE", _make_path("_template", name), params=params \n File "build/bdist.linux-x86_64/egg/elasticsearch/transport.py", line 353, in perform_request \n timeout=timeout, \n File "build/bdist.linux-x86_64/egg/elasticsearch/connection/http_urllib3.py", line 232, in perform_request \n raise ConnectionError("N/A", str(e), e) \nConnectionError: ConnectionError(a float is required) caused by: TypeError(a float is required) \n

I am making a delete_template call here. I am suspecting it started coming after this change:
#937, as it was working in version 7.0.0. With this change request_timeout will go as normal query_params and _escape will be called on this value which will convert it to a string. While urllib library is expecting this parameter as a float value. Please let me know if any extra information required around the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions