cancel
Showing results for 
Search instead for 
Did you mean: 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results for 
Search instead for 
Did you mean: 

Connection Error Python databricks-sql-connector

JohnsonBDSouza
New Contributor II

Hello Databricks Community, I'm trying to connect to Databricks via the Python library (databricks-sql-connector-3.0.1). This below code was working few months ago. Now, it is failing to connect.

hostname, http_path and access_token are valid values and there is not connectivity issue from my machine to Databricks instance.

Any pointer will be of great help. Thanks.

>>> connection = sql.connect(server_hostname = hostname, http_path = http_path, access_token = token)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python\Python38\lib\site-packages\databricks\sql\__init__.py", line 51, in connect
return Connection(server_hostname, http_path, access_token, **kwargs)
File "C:\Python\Python38\lib\site-packages\databricks\sql\client.py", line 225, in __init__
self.thrift_backend = ThriftBackend(
File "C:\Python\Python38\lib\site-packages\databricks\sql\thrift_backend.py", line 209, in __init__
self.retry_policy = databricks.sql.auth.thrift_http_client.DatabricksRetryPolicy(
File "C:\Python\Python38\lib\site-packages\databricks\sql\auth\retry.py", line 131, in __init__
super().__init__(
TypeError: __init__() got an unexpected keyword argument 'allowed_methods'
>>>

1 REPLY 1

Thanks the pointers @Retired_mod 

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now