In cursor's init - ssl_client_cert= None ; proxies= ('<path_to_cert>','<path_to_key>')
The error thrown for my use case for the conn.execute line was:
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 711, in merge_environment_settings
no_proxy = proxies.get('no_proxy') if proxies is not None else None
AttributeError: 'tuple' object has no attribute 'get'
In function
cursor
of ClassConnection
, an object of classCursor
is created withssl_client_cert
andproxies
as 7th and 8th parameters respectively as seen here: https://github.com/druid-io/pydruid/blob/master/pydruid/db/api.py#L169-L177The Cursor object's
init
has the 2 parameters exchanged, effectively puttingssl_client_cert's
value intoproxies
and vice versa as seen here: https://github.com/druid-io/pydruid/blob/master/pydruid/db/api.py#L199-L208Example use case from python 3.8 using sqlalchemy:
Having a print statement in the init function will show the value:
results in:
The error thrown for my use case for the
conn.execute
line was:The above led me to debug the code and find this.