Protobuf files started to produce decoding errors

48 views
Skip to first unread message

PJ Meyer

unread,
May 24, 2024, 4:21:31 PM5/24/24
to RTD Developers
Hi,

This seems to have worked yesterday, but today the TripUpdate.pb and VehiclePosition.pb protobufs seem to be producing decoding errors

Code
import gtfs_realtime_pb2
import requests

feed = gtfs_realtime_pb2.FeedMessage()
feed.ParseFromString(response.content)

Result
Traceback (most recent call last):
  File <redacted>, line 6, in <module>
    feed.ParseFromString(response.content)
google.protobuf.message.DecodeError: Error parsing message

I tried regenerating the latest proto file from Google's GTFS specs, but I get the same error.

Although, the Alerts.pb does work. So this seems like some kind of schema change perhaps? The content coming through does look like a collection of protobuf bytes, and getting a 200, it just can't parse it into FeedMessage.

Any help is appreciated!

Thanks,
PJ

PJ Meyer

unread,
May 29, 2024, 11:52:46 AM5/29/24
to RTD Developers
Looks like VehiclePosition.pb started to work (and Alerts.pb still works), but TripUpdate.pb is still not decoding with the GTFS proto schema. Any update here?

PJ Meyer

unread,
May 30, 2024, 3:48:05 PM5/30/24
to RTD Developers
And now TripUpdate.pb started to decode again today! Not sure what changed, but now it's all good!
Reply all
Reply to author
Forward
0 new messages