fix: fix get_field for reserved names in field path by busunkim96 · Pull Request #722 · googleapis/gapic-generator-python · GitHub
Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

fix: fix get_field for reserved names in field path#722

Closed
busunkim96 wants to merge 3 commits into
masterfrom
fix-tts
Closed

fix: fix get_field for reserved names in field path#722
busunkim96 wants to merge 3 commits into
masterfrom
fix-tts

Conversation

@busunkim96

Copy link
Copy Markdown
Contributor

Texttospeech has a google.api.method_signature with the reserved name input. Append _ to field_paths in get_field so lookup succeeds.

  File "/usr/local/google/home/busunkim/.cache/bazel/_bazel_busunkim/d0728a13f0c84f7fc8315b82038f5e65/sandbox/linux-sandbox/1137/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/schema/wrappers.py", line 819, in <genexpr>
    for name_and_field in filter_fields(sig)
  File "/usr/local/google/home/busunkim/.cache/bazel/_bazel_busunkim/d0728a13f0c84f7fc8315b82038f5e65/sandbox/linux-sandbox/1137/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/schema/wrappers.py", line 807, in filter_fields
    field = self.input.get_field(*name.split('.'))
  File "/usr/local/google/home/busunkim/.cache/bazel/_bazel_busunkim/d0728a13f0c84f7fc8315b82038f5e65/sandbox/linux-sandbox/1137/execroot/com_google_googleapis/bazel-out/host/bin/external/gapic_generator_python/gapic_plugin.runfiles/gapic_generator_python/gapic/schema/wrappers.py", line 414, in get_field
    cursor = self.fields[field_path[0]]
KeyError: 'input'
--python_gapic_out: protoc-gen-python_gapic: Plugin failed with status code 1.
Target //google/cloud/texttospeech/v1beta1:texttospeech-v1beta1-py failed to build

https://github.com/googleapis/googleapis/blob/69697504d9eba1d064820c3085b4750767be6d08/google/cloud/texttospeech/v1beta1/cloud_tts.proto#L52

@busunkim96 busunkim96 requested a review from a team December 28, 2020 16:28
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Dec 28, 2020
@codecov

codecov Bot commented Dec 28, 2020

Copy link
Copy Markdown

@busunkim96

Copy link
Copy Markdown
Contributor Author

@busunkim96 busunkim96 closed this Dec 28, 2020
@busunkim96 busunkim96 deleted the fix-tts branch January 21, 2021 16:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant