question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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: https://github.com/elastic/elasticsearch-py/pull/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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
honzakralcommented, Nov 14, 2019

Fix has just been released as 7.1.0, hope this helps!

0reactions
nsonic001commented, Nov 13, 2019

@tj8000rpm I don’t know if you noticed this or not, but while we execute put_template and delete_template with request_timeout It actually does the operation but response is a failure.

Basically, If I execute es.indices.put_template(name=name, body=body, master_timeout="120s", request_timeout=120) it throws exception of ConnectionError but If I check the templates in es. template are getting added/updated. This is weird.

@Winterflower for reference.

Read more comments on GitHub >

github_iconTop Results From Across the Web

It keeps returning TypeError: a float is required - Stack Overflow
You are passing in a list: [(2 - yr)/(1 - xr)]. That's not a float , it is a list with one element....
Read more >
How to solve the "Timeout value connect must be an int or ...
This happens when you use an incompatible version of the Python requests library. You need to use at least version 2.9.1 with the...
Read more >
AllegroGraph 7.0.3 Change History - Franz Inc.
AllegroGraph 7.0.3. AllegroGraph Server: General Changes. No significant changes. HTTP Client. No significant changes. SPARQL.
Read more >
EPSON RC+ 7.0 - User's Guide
This manual contains the information necessary for the correct use of the Manipulator. Please carefully read this manual and other related manuals before ......
Read more >
Python Elasticsearch Client - Read the Docs
The client can be configured to inspect the cluster state to get a list of nodes upon startup, periodically and/or on failure. See...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found