Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

SSL Certificate Error Issue before and after Python 3.11.13 with Databricks Instance

未關閉
#585 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
25/100
Issue 類型
缺陷
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
python
領域
database, security

研究方向

從提供的 pyproject.toml 設定和 main.py 進入點開始,接著針對一個在所列 Python 版本中需要 SSL 憑證的 Databricks 環境執行 uv 命令。使用 results.log 和回報的 SSLVerificationError 比較行為;在受影響的版本中,範例查詢回傳其資料表的資料列數即表示完成。

由索引模型根據 Issue 內容生成。

描述

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

  1. Setup environment as below
  2. 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
主要語言
Python
星號
233
分支
152
平均合併
21 小時 5 分鐘
30 天內合併 PR
10

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

databricks/databricks-sql-python 的其他 Issue

查看 databricks/databricks-sql-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。