-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Occasional ValueError when using CAR.from_bytes #362
Comments
Happens about once every million or so commits from the firehose, so it's fairly rare. I've seen it 3 times so far. Set up a catch in code for it and am waiting for it to happen again so I can share the blocks that cause it. |
My guess is CAR.from_bytes(None). blocks sometimes are empty somehow... |
Yeah, I think this is the issue. I think it can be a blank binary string sometimes - although it's out of spec for the AT Protocol, sometimes commits have empty blocks. I handle if for the astronomy feeds with an extra check you could put before
|
sounds like we need to fix the examples :) |
Yep, that's what I ended up catching was an empty block. |
Using the example code for CAR decoding firehose commits...
https://atproto.blue/en/latest/atproto_firehose/index.html
Will occasionally result in the following error:
ValueError: Failed to read CAR header. Invalid uvarint
With this traceback...
The text was updated successfully, but these errors were encountered: