Developer Knowledge fallback search response is not iterable
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
從 developer-knowledge/conftest.py 開始檢查 fallback 的 SearchDocumentChunksResponse,然後將其行為與 developer-knowledge/search_document_chunks.py 中的迭代進行比較。執行 python -m pytest developer-knowledge -q;完成表示四個重點測試全部通過,且範例的分頁迴圈可以使用 fallback 回應。
由索引模型根據 Issue 內容生成。
描述
In which file did you encounter the issue?
developer-knowledge/conftest.py and developer-knowledge/search_document_chunks.py
Did you change the file? If so, how?
No.
Describe the issue
The Developer Knowledge samples include a fallback implementation for environments where the preview client is not installed. The fallback SearchDocumentChunksResponse stores its results but is not iterable, while the sample iterates over the response as a pager.
Reproduction command:
python -m pytest developer-knowledge -q
Result:
3 passed, 1 failed
...
developer-knowledge\\search_document_chunks.py:44: in search_document_chunks
for chunk in response:
TypeError: 'SearchDocumentChunksResponse' object is not iterable
Expected behavior: all four focused tests pass using the intended fallback. Actual behavior: the search test fails before it can exercise the sample.
Environment: Python 3.12, pytest 9.1.1, repository main at commit 430a87ada6f2d33f318b5d16b77464679905a140.
- 主要語言
- Jupyter Notebook
- 星號
- 8.1k
- 分支
- 6.7k
- 平均合併
- 4 天 4 小時
- 30 天內合併 PR
- 8
環境準備
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
GoogleCloudPlatform/python-docs-samples 的其他 Issue
-
samples
難度 1/5 1 小時以內 新手友好度 92/100
GoogleCloudPlatform/python-docs-samples#14610 ·
維護者通常 1 天內回覆
-
samples
難度 2/5 1-3 小時 新手友好度 88/100
GoogleCloudPlatform/python-docs-samples#14611 ·
維護者通常 1 天內回覆
-
chore(generative_ai) Update model references for generative_ai samples可能重新可做 @XrossFox 於 152 天前認領,目前沒有進行中的 PR。 未關閉samples
GoogleCloudPlatform/python-docs-samples#14117 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
Fix Pipeline dependency issues for geospatial-classification/serving_app可能重新可做 @XrossFox 於 164 天前認領,目前沒有進行中的 PR。 未關閉samples
GoogleCloudPlatform/python-docs-samples#14091 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
samples
難度 4/5 3-5 天 新手友好度 30/100
GoogleCloudPlatform/python-docs-samples#13734 · 4 則留言 ·
維護者通常 1 天內回覆
查看 GoogleCloudPlatform/python-docs-samples 的全部 Issue
相似的 Issue
-
bug good first issue
難度 2/5 1-3 小時 新手友好度 86/100
amponce/archive-movie-browser#354 ·
維護者通常 1 天內回覆
-
area/proxy kind/bug priority/backlog triage/accepted
難度 2/5 1-3 小時 新手友好度 68/100
lexfrei/cloudflare-tunnel-gateway-controller#840 ·
維護者通常 1 天內回覆
-
clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2
難度 2/5 1-3 小時 新手友好度 76/100
openclaw/openclaw#159334 · 1 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
-
owner:devin P3 security server
難度 2/5 1-3 小時 新手友好度 76/100
thetangstr/agentdash#811 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
beyond-all-reason/tachyon#164 ·