Skip to content

[Docs]: ListenV2MediaMessage fails validation if data kwarg is used #633

@davechallis

Description

@davechallis

Affected page or section

https://github.com/deepgram/deepgram-python-sdk/blob/main/websockets-reference.md#listen-v2-connect

What is unclear or wrong?

The docs say to send data using ListenV2MediaMessage(data=audio_bytes). This causes an error, as data is not considered a valid keyword argument.

Suggested change

Example code (if any)

_ = ListenV2MediaMessage(data=b'')

fails with:

   validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
pydantic_core._pydantic_core.ValidationError: 1 validation error for ListenV2MediaMessage
data
  Extra inputs are not permitted [type=extra_forbidden, input_value=b'', input_type=bytes]
    For further information visit https://errors.pydantic.dev/2.11/v/extra_forbidden

SDK parity (if relevant)

  • This change may need updates in other SDKs

Session ID (optional)

No response

Project ID (optional)

No response

Request ID (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions