Databricks SDK exception downloading file on Linux x64

Aperta
#1,630 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Start by reading the download flow in databricks/sdk/mixins/files.py and its endpoint fallback in databricks/sdk/mixins/files_utils.py. Reproduce with the provided download_to call and compare the Linux and Windows behavior, especially after the download URL returns 403. Done means the SDK handles this case correctly instead of making the malformed fallback request and raising NotFound.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description
I used the Databricks SDK to download a file so as to overwrite a temp file I have. Code works fine on Windows 11 x64, fails on Linux with error

databricks.sdk.errors.platform.NotFound: No API found for 'GET /fs/filesdbfs:/Volumes/dsl/vasilis_anagnostopoulos/gurobi_storage/mps-files/some.mps'

Reproduction

from databricks.sdk import WorkspaceClient
w = WorkspaceClient(profile="DEFAULT")
w.files.download_to( "dbfs:/Volumes/dsl/vasilis_anagnostopoulos/gurobi_storage/mps-files/some.mps", "/home/azureuser/some.mps")

Expected behavior
I expected the file to download without exceptio

Is it a regression?
It worked before, I think 0.158.0. But does not work with 0.161.0, 0.162.0,0.163.0
Both with Python 3.12 and 3.14

Debug Logs
The SDK logs helpful debugging information when debug logging is enabled. Set the log level to debug by adding logging.basicConfig(level=logging.DEBUG) to your program, and include the logs here.

... w.files.download_to( "dbfs:/Volumes/dsl/vasilis_anagnostopoulos/gurobi_storage/mps-files/some.mps", "/home/azureuser/some.mps")
DEBUG:databricks.sdk.oauth:Retrieving token for c47a7efe-73f8-4c12-9343-fa35bc5de692
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): adb-4600033890908005.5.azuredatabricks.net:443
DEBUG:urllib3.connectionpool:https://adb-4600033890908005.5.azuredatabricks.net:443 "POST /oidc/v1/token HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): adb-4600033890908005.5.azuredatabricks.net:443
DEBUG:urllib3.connectionpool:https://adb-4600033890908005.5.azuredatabricks.net:443 "GET /api/2.0/fs/endpoints HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): adb-4600033890908005.5.azuredatabricks.net:443
DEBUG:urllib3.connectionpool:https://adb-4600033890908005.5.azuredatabricks.net:443 "POST /api/2.0/fs/create-download-url?path=dbfs%3A%2FVolumes%2Fdsl%2Fvasilis_anagnostopoulos%2Fgurobi_storage%2Fmps-files%2Fsome.mps&expire_time=2026-11-09T10%3A54%3A56Z HTTP/1.1" 200 None
DEBUG:databricks.sdk:POST /api/2.0/fs/create-download-url?path=dbfs:/Volumes/dsl/vasilis_anagnostopoulos/gurobi_storage/mps-files/some.mps&expire_time=2026-11-09T10:54:56Z
< 200 OK
< {
< "headers": [
< {
< "name": "x-ms-version",
< "value": "REDACTED"
< }
< ],
< "url": "https://stdatabricksprodwestde01.blob.core.windows.net/unitycontainer/4297b067-8fb0-4516-ac48-d2... (342 more bytes)"
< }
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): stdatabricksprodwestde01.blob.core.windows.net:443
DEBUG:urllib3.connectionpool:https://stdatabricksprodwestde01.blob.core.windows.net:443 "GET /unitycontainer/4297b067-8fb0-4516-ac48-d2efa094dd59/volumes/7da2aa98-621f-4f88-ab1d-3ba58665f5fe/mps-files/some.mps?sig=vCeAnJ5mOyw9idkWJAjBTlkdOrhzt1x6cRoDSgq2Nm8%3D&sktid=00ab5264-f7ed-4d89-9011-19bf33ed8169&se=2026-11-09T11%3A09%3A56Z&sv=2026-10-06&skoid=277d5373-4e08-4531-8bbe-31f7270a56a9&sks=b&ske=2026-11-09T11%3A30%3A24Z&skt=2026-11-09T09%3A30%3A24Z&sp=r&skv=2025-01-05&sr=b HTTP/1.1" 403 246
INFO:databricks.sdk.mixins.files_utils:IO_OFFLOAD at https://adb-4600033890908005.5.azuredatabricks.net failed before commit, trying the next endpoint: Unsuccessful download. Response status: 403, body: b'\xef\xbb\xbfAuthorizationFailureThis request is not authorized to perform this operation.\nRequestId:2015866b-901e-0071-5030-70d9a6000000\nTime:2026-11-09T09:54:57.1738889Z'
DEBUG:urllib3.connectionpool:https://adb-4600033890908005.5.azuredatabricks.net:443 "GET /api/2.0/fs/filesdbfs%3A/Volumes/dsl/vasilis_anagnostopoulos/gurobi_storage/mps-files/some.mps HTTP/1.1" 404 None
DEBUG:databricks.sdk:GET /api/2.0/fs/filesdbfs:/Volumes/dsl/vasilis_anagnostopoulos/gurobi_storage/mps-files/some.mps
< 404 Not Found
< [raw stream]
Traceback (most recent call last):
File "", line 2, in
w.files.download_to( "dbfs:/Volumes/dsl/vasilis_anagnostopoulos/gurobi_storage/mps-files/some.mps", "/home/azureuser/some.mps")
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/azureuser/gurobi-computation-server/computation-server/.venv/lib/python3.14/site-packages/databricks/sdk/mixins/files.py", line 1289, in download_to
_walk_endpoints(
~~~~~~~~~~~~~~~^
self._clients_for(self._transfer_endpoints()),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<7 lines>...
),
^^
)
^
File "/home/azureuser/gurobi-computation-server/computation-server/.venv/lib/python3.14/site-packages/databricks/sdk/mixins/files_utils.py", line 515, in _walk_endpoints
raise failure_opt.error
databricks.sdk.errors.platform.NotFound: No API found for 'GET /fs/filesdbfs:/Volumes/dsl/vasilis_anagnostopoulos/gurobi_storage/mps-files/some.mps'

Other Information
Linux ilpservervm 6.8.0-1070-azure #78~22.04.1-Ubuntu SMP Thu Sep 24 18:46:45 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux

Python 3.14.10 (main, Oct 26 2026, 14:09:22) [Clang 23.1.3 ] on linux

Additional context

I m running on an Azure VM. Locally I run on my work laptop

Lingua principale
Python
Stelle
577
Fork
229
Merge medio
40m
PR unite (30g)
12

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di databricks/databricks-sdk-py

Tutte le issue di databricks/databricks-sdk-py

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.