SSL Certificate Error Issue before and after Python 3.11.13 with Databricks Instance
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
Direzione di ricerca
Inizia con la configurazione fornita in pyproject.toml e il punto di ingresso main.py, quindi esegui il comando uv in un ambiente Databricks che richiede un certificato SSL nelle versioni di Python elencate. Usa results.log e l’SSLVerificationError riportato per confrontare il comportamento; il lavoro è completato quando la query di esempio restituisce il numero di righe della relativa tabella nelle versioni interessate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Overview
When I try to use different versions of python to connect to a databricks environment, I get an SSL certificate issue. It appears to be resolved in 3.11.13 but is broken in versions below (e.g. 3.11.11) and above (3.12, 3.13). Please note that you will need to test with an environment that require an ssl certificate.
Recreation Steps
- Setup environment as below
- Run script
uv run main.py --python 3.11.11
Expected - The script will output a row count for the specific table
Actual - An SSLVerificationError will happen
Hardware Info
- macOS - 15.5
- chip - Apple M4 Pro
Affected Python Version
- 3.11.11, <3.11.13
- > 3.11.13
Setup
setup uv project
uv init dbks_testing --python
sample uv project template
[project]
name = "dbks-testing"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"databricks-sqlalchemy>=2.0.6",
]
script to verify issue
you will need to change the table variable to a valid table for your schema
def main():
access_token = os.getenv("DATABRICKS_TOKEN")
server_hostname = os.getenv("DATABRICKS_SERVER_HOSTNAME")
http_path = os.getenv("DATABRICKS_HTTP_PATH")
catalog = os.getenv("DATABRICKS_CATALOG")
schema = os.getenv("DATABRICKS_SCHEMA")
engine = create_engine(
url=f"databricks://token:{access_token}@{server_hostname}?" +
f"http_path={http_path}&catalog={catalog}&schema={schema}"
)
session = Session(engine)
account = Table(table, MetaData(schema=schema), autoload_with=engine)
print(f"Table count for {account.name} is {session.query(account).count()}")
if __name__ == "__main__":
# add logging
logging.getLogger("databricks.sql").setLevel(logging.DEBUG)
logging.basicConfig(filename="results.log",
level=logging.DEBUG,
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s")
# set variables need for main
table = "account"
main()
Run command in project
uv run main.py --python 3.11.11
- Lingua principale
- Python
- Stelle
- 233
- Fork
- 152
- Merge medio
- 21h 5m
- PR unite (30g)
- 10
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di databricks/databricks-sql-python
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Tutte le issue di databricks/databricks-sql-python
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
canonical/paas-charm#368 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
tech debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
addition to tracking list Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
StevenBlack/hosts#3256 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
qualcomm/qai-appbuilder#275 ·