Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

for testing purposes #139

Closed
wants to merge 4 commits into from
Closed

for testing purposes #139

wants to merge 4 commits into from

Conversation

parthea
Copy link
Contributor

@parthea parthea commented Feb 15, 2022

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@parthea parthea added the owlbot:ignore instruct owl-bot to ignore a PR label Feb 15, 2022
@parthea parthea requested review from a team as code owners February 15, 2022 10:06
@product-auto-label product-auto-label bot added the api: transcoder Issues related to the googleapis/python-video-transcoder API. label Feb 15, 2022
@parthea parthea added kokoro:force-run Add this label to force Kokoro to re-run the tests. kokoro:run Add this label to force Kokoro to re-run the tests. labels Feb 15, 2022
@yoshi-kokoro yoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Feb 15, 2022
@parthea parthea force-pushed the for-testing-purposes branch 2 times, most recently from 1a51f96 to 4cf6b64 Compare February 15, 2022 11:07
@parthea parthea force-pushed the for-testing-purposes branch from 4cf6b64 to 25eb145 Compare February 15, 2022 11:09
@parthea parthea requested a review from a team as a code owner February 15, 2022 12:12
@busunkim96
Copy link
Contributor

It looks like the sample that is failing is the one that exercises the mapping field:

transcoder_v1.types.ElementaryStream(
key="vtt-stream0",
# The following doesn't work because "mapping" is a reserved
# argument name in GCP python client libraries (see
# https://github.com/googleapis/proto-plus-python/blob/main/proto/message.py#L447):
#
# text_stream=transcoder_v1.types.TextStream(
# codec="webvtt",
# mapping=[
# transcoder_v1.types.TextStream.TextMapping(
# atom_key="atom0",
# input_key="caption-input0",
# input_track=0,
# ),
# ],
# ),
# Use a python dictionary as a workaround:
text_stream={
"codec": "webvtt",
"mapping": [
{
"atom_key": "atom0",
"input_key": "caption-input0",
"input_track": 0,
}
],
},
),

capsys = <_pytest.capture.CaptureFixture object at 0x7f4e4e1e1b50>
test_bucket = <Bucket: python-samples-transcoder-010b96db-c2a2-4939-b543-748a4be90aa8>

    def test_create_job_with_embedded_captions(capsys, test_bucket):
        create_job_with_embedded_captions.create_job_with_embedded_captions(
>           project_id, location, input_uri, captions_uri, output_uri_for_embedded_captions,
        )

job_test.py:410:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
create_job_with_embedded_captions.py:105: in create_job_with_embedded_captions
    "input_track": 0,
.nox/py-3-7/lib/python3.7/site-packages/proto/message.py:548: in __init__
    pb_value = marshal.to_proto(pb_type, value)
.nox/py-3-7/lib/python3.7/site-packages/proto/marshal/marshal.py:211: in to_proto
    pb_value = rule.to_proto(value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <proto.marshal.rules.message.MessageRule object at 0x7f4e50560490>
value = {'codec': 'cea608', 'mapping': [{'atom_key': 'atom0', 'input_key': 'caption-input0', 'input_track': 0}]}

    def to_proto(self, value):
        if isinstance(value, self._wrapper):
            return self._wrapper.pb(value)
        if isinstance(value, dict) and not self.is_map:
            # We need to use the wrapper's marshaling to handle
            # potentially problematic nested messages.
            try:
                # Try the fast path first.
>               return self._descriptor(**value)
E               ValueError: Protocol message TextStream has no "mapping" field.

.nox/py-3-7/lib/python3.7/site-packages/proto/marshal/rules/message.py:36: ValueError

@parthea parthea closed this Feb 16, 2022
@parthea
Copy link
Contributor Author

parthea commented Feb 16, 2022

I wasn't able to produce this initially. I think there was an issue where my environment. This issue will be fixed in googleapis/proto-plus-python#301.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: transcoder Issues related to the googleapis/python-video-transcoder API. owlbot:ignore instruct owl-bot to ignore a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants