Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Developer Knowledge fallback search response is not iterable

オープン 初心者向け
#14,609 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
88/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
backend, testing

調査の方向性

developer-knowledge/conftest.py から始めてフォールバックの SearchDocumentChunksResponse を調べ、次に developer-knowledge/search_document_chunks.py の反復処理とその動作を比較します。python -m pytest developer-knowledge -q を実行します。完了とは、4つすべての対象テストがパスし、サンプルのページャーループでフォールバックレスポンスを使用できることを意味します。

索引モデルが issue の本文から書いたものです。

説明

samples

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時間
マージ済み PR(30日)
8

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

GoogleCloudPlatform/python-docs-samples のほかの issue

GoogleCloudPlatform/python-docs-samples の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。