livekit / python-sdks

LiveKit real-time and server SDKs for Python
https://docs.livekit.io
Apache License 2.0
74 stars 24 forks source link

Room has no field "version" at "WebhookEvent.room" #150

Closed palma9 closed 5 months ago

palma9 commented 5 months ago

When try to receive an event from a weehook it failts trying to get a field "version" that is not present in the response.

I'm calling receive function from WebhookReceiver class.

  File "/usr/local/lib/python3.10/site-packages/livekit/api/webhook.py", line 21, in receive
    return Parse(body, proto_webhook.WebhookEvent())
  File "/usr/local/lib/python3.10/site-packages/google/protobuf/json_format.py", line 421, in Parse
    return ParseDict(js, message, ignore_unknown_fields, descriptor_pool,
  File "/usr/local/lib/python3.10/site-packages/google/protobuf/json_format.py", line 446, in ParseDict
    parser.ConvertMessage(js_dict, message, '')
  File "/usr/local/lib/python3.10/site-packages/google/protobuf/json_format.py", line 487, in ConvertMessage
    self._ConvertFieldValuePair(value, message, path)
  File "/usr/local/lib/python3.10/site-packages/google/protobuf/json_format.py", line 612, in _ConvertFieldValuePair
    raise ParseError(
google.protobuf.json_format.ParseError: Failed to parse room field: Message type "livekit.Room" has no field named "version" at "WebhookEvent.room".
 Available Fields(except extensions): "['sid', 'name', 'emptyTimeout', 'maxParticipants', 'creationTime', 'turnPassword', 'enabledCodecs', 'metadata', 'numParticipants', 'numPublishers', 'activeRecording']".

Seems like something is outdated.

davidzhao commented 5 months ago

I see the problem.. this is because the Python webhook receiver isn't ignoring unknown fields.. we'll fix this shortly