Skip to content

"databricks.sql.exc.RequestError: Error during request to server" with versions 2.6 onwards #169

Description

@DJSaunders1997

When running the quickstart example, I get errors initializing the connection unless I downgrade the package version to 2.5 .

With version 2.6 and above

Error Trace:

$ python example.py
Traceback (most recent call last):
  File "C:\Users\<username>\Databricks_SQL\example.py", line 8, in <module>
    connection = sql.connect(
  File "C:\Users\<username>\AppData\Local\anaconda3\envs\databrickssqlenv_2\lib\site-packages\databricks\sql\__init__.py", line 50, in connect
    return Connection(server_hostname, http_path, access_token, **kwargs)
  File "C:\Users\<username>\AppData\Local\anaconda3\envs\databrickssqlenv_2\lib\site-packages\databricks\sql\client.py", line 189, in __init__
    self._session_handle = self.thrift_backend.open_session(
  File "C:\Users\<username>\AppData\Local\anaconda3\envs\databrickssqlenv_2\lib\site-packages\databricks\sql\thrift_backend.py", line 469, in open_session
    response = self.make_request(self._client.OpenSession, open_session_req)
  File "C:\Users\<username>\AppData\Local\anaconda3\envs\databrickssqlenv_2\lib\site-packages\databricks\sql\thrift_backend.py", line 398, in make_request
    self._handle_request_error(error_info, attempt, elapsed)
  File "C:\Users\<username>\AppData\Local\anaconda3\envs\databrickssqlenv_2\lib\site-packages\databricks\sql\thrift_backend.py", line 262, in _handle_request_error
    raise network_request_error
databricks.sql.exc.RequestError: Error during request to server

With downgraded version 2.5

Code works as expected

$ python example.py
Row(id=0)
Row(id=1)
Row(id=2)
Row(id=3)
Row(id=4)
Row(id=5)
Row(id=6)
Row(id=7)
Row(id=8)
Row(id=9)

Environment

It's a pretty standard environment, but for reproducibility:

OS - Windows 10

conda.yml:

name: databrickssqlenv

dependencies:
  - python=3.10
  - pip
  - pip:
    - databricks-sql-connector

Fix

Is there a known fix for this issue? I'd like to use the latest version to enable features such as Azure OAuth.

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions