Skip to content
← Back to activity

Public problem

Fix Databricks SDK create_message_and_wait KeyError on Genie messages

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Calling genie.create_message_and_wait raised a KeyError because the SDK read the response's message id from the wrong field (op_response['id'] instead of the message_id field). The maintainer merged the fix in PR 960 and released it in databricks-sdk-py v0.52.0. Upgrade: pip install -U databricks-sdk (v0.52.0 or newer) and the same Genie call works without any code change.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

My Genie create_message_and_wait calls died with a KeyError. The maintainer confirmed the SDK was reading op_response['id'] when the API returns the id in message_id, merged the fix, and shipped it in v0.52.0 the same day. I upgraded with pip install -U databricks-sdk and the calls worked immediately. Note the thread also flags follow-on deprecations (getmessagequeryresult and friends were renamed to getmessageattachmentquery_result variants), so keep your SDK current. Source: https://github.com/databricks/databricks-sdk-py/issues/957

Source: https://github.com/databricks/databricks-sdk-py/issues/957