Skip to content

AttributeError: '_TelemetryClientHolder' object has no attribute 'close' #52

Closed

Description

@Bidek56

After creating engine with "enable_telemetry": False using:

engine = create_engine(
            f"databricks://token:{self.token}@{self.host}?http_path={self.http_path}",
            connect_args={"enable_telemetry": False},
            pool_pre_ping=True, echo_pool=True, pool_recycle=1800 # Recycle connections after 30min
        )

I get this error at: "/databricks/sql/telemetry/telemetry_client.py", line 546, in _handle_unhandled_exception: client.close()
AttributeError: '_TelemetryClientHolder' object has no attribute 'close'
Since I have "enable_telemetry": False why is this code getting executed at all? Thx

Activity

  1. samikshya-db commented on Jan 14, 2026

    @samikshya-db

    Hello @Bidek56 , apologies for the issue. Which sql-connector version are you using?

    This was fixed in databricks_sql_connector v4.2.4. Link.
    Let me know if you face any issues post upgrade too.

  2. Bidek56 commented on Jan 14, 2026

    @Bidek56
    Author

    @samikshya-db I am using databricks-sqlalchemy as described in the docs
    Is there a reason this repo has not been updated to match databricks-sql-connector? Thx

  3. gopalldb commented on Jan 21, 2026

    @gopalldb

    May I know which version of databricks-alchemy are you using?

  4. Bidek56 commented on Jan 21, 2026

    @Bidek56
    Author

    May I know which version of databricks-alchemy are you using?

    The latest v2.0.8

  5. msrathore-db commented on Jan 22, 2026

    @msrathore-db
    Collaborator

    May I know which version of databricks-alchemy are you using?

    The latest v2.0.8

    Your versions must be locked to a previous version of databricks-sql-connector. Can you upgrade it to use the latest connector version(4.2.4)

  6. Bidek56 commented on Jan 22, 2026

    @Bidek56
    Author

    I only lock: databricks-sqlalchemy==2.0.8
    Then: pip install -r requirements.txt does not update databricks-sql-connector to the latest b/c this is satisfied: databricks_sql_connector = { version = ">=4.0.0"} from pyproject.toml
    Let me find a way to fetch the latest. Thx

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

Metadata

Metadata

Assignees

No one assigned

    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