We're updating the issue view to help you get more done. 

TypeError: __init__() got an unexpected keyword argument 'host'

Description

The class connection.ConnectionException accepts the parameteres messages and endpoint.


Unfortunately in cluster.py the exception is created with a host keyword-argument.

Here is a quick fix:

1 2 3 4 5 6 7 8 9 10 11 12 13 diff --git a/cassandra/cluster.py b/cassandra/cluster.py index ead250bd..cf41660a 100644 --- a/cassandra/cluster.py +++ b/cassandra/cluster.py @@ -2599,7 +2599,7 @@ class Session(object): # TODO remove host pool again ??? new_pool = HostConnectionPool(host, distance, self) except AuthenticationFailed as auth_exc: - conn_exc = ConnectionException(str(auth_exc), host=host) + conn_exc = ConnectionException(str(auth_exc), endpoint=host) self.cluster.signal_connection_failure(host, conn_exc, is_host_addition) return False except Exception as conn_exc:

 

Environment

None

Pull Requests

None

Status

Assignee

Unassigned

Reporter

Henning Schröder

Fix versions

Labels

None

Reproduced in

None

PM Priority

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

External issue ID

None

Doc Impact

None

Reviewer

None

Size

None

Affects versions

3.17.1
3.18.0

Priority

Major