Databricks app with Genie access

未关闭
#1,073 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
python
领域
api

调研方向

首先,使用报告的 SDK 版本运行 issue 中链接的 Databricks Genie apps example,然后检查 app.py 中 submit_prompt 附近的代码以及 databricks/sdk/service/dashboards.py 中的 SDK 调用。在通过 databricks/sdk/core.py 跟踪失败之前,检查所引用的 space 和 request 流程。完成的标准是该 example 能够创建 conversation,且不会出现 ResourceDoesNotExist。

由索引模型根据 Issue 内容生成。

描述

Description
I have created an databricks app with Genie access. When running the example at https://docs.databricks.com/aws/en/dev-tools/databricks-apps/genie it throws following error:

ResourceDoesNotExist: Unable to get space [01f0a7a327cd11978f2951f81a61bfdd]. Caused by Node with resource name Some(datarooms/01f0a7a327cd11978f2951f81a61bfdd) does not exist.
Traceback:
File "/app/python/source_code/.venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling
    result = func()
             ^^^^^^
File "/app/python/source_code/.venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 590, in code_to_exec
    exec(code, module.__dict__)
File "/app/python/source_code/app.py", line 322, in <module>
    submit_prompt(prompt, chat_container)
File "/app/python/source_code/app.py", line 150, in submit_prompt
    response = w.genie.start_conversation_and_wait(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/python/source_code/.venv/lib/python3.11/site-packages/databricks/sdk/service/dashboards.py", line 1299, in start_conversation_and_wait
    return self.start_conversation(content=content, space_id=space_id).result(timeout=timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/python/source_code/.venv/lib/python3.11/site-packages/databricks/sdk/service/dashboards.py", line 1287, in start_conversation
    op_response = self._api.do('POST',
                  ^^^^^^^^^^^^^^^^^^^^
File "/app/python/source_code/.venv/lib/python3.11/site-packages/databricks/sdk/core.py", line 157, in do
    response = retryable(self._perform)(method,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/python/source_code/.venv/lib/python3.11/site-packages/databricks/sdk/retries.py", line 54, in wrapper
    raise err
File "/app/python/source_code/.venv/lib/python3.11/site-packages/databricks/sdk/retries.py", line 33, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
File "/app/python/source_code/.venv/lib/python3.11/site-packages/databricks/sdk/core.py", line 247, in _perform
    raise error from None

Reproduction
Code shared in above link.

Expected behavior
Conversation should be created

Is it a regression?
databricks-0.2

Debug Logs
The SDK logs helpful debugging information when debug logging is enabled. Set the log level to debug by adding logging.basicConfig(level=logging.DEBUG) to your program, and include the logs here.

Other Information

  • OS: [e.g. macOS]
  • Version: [e.g. 0.1.0]

Additional context
Add any other context about the problem here.

主要语言
Python
星标
577
派生
229
平均合并
40 分钟
30 天内合并 PR
12

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

databricks/databricks-sdk-py 的其他 Issue

查看 databricks/databricks-sdk-py 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。