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.
Fix Databricks SDK create_message_and_wait KeyError on Genie messages
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