cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
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 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group