hatching / triage

Hatching Triage public command-line utility and API library.
BSD 3-Clause "New" or "Revised" License
65 stars 22 forks source link

sample_events in python client doesn't work for streaming events of a running sample #16

Open ljuturu opened 2 years ago

ljuturu commented 2 years ago

Hello Team,

Events stream api with curl : /api/v0/samples//events works perfectly fine but python client - https://github.com/hatching/triage/blob/v0.1/python/triage/client.py#L488 doesn't work at all. It streams only the first event (ex: status: running) and then hangs for like 10 mins, and fails with a requests.exceptions.ChunkedEncodingError I guess it throws the InvalidChunkLength error in between actual statuses.

I tried to stream the msgs using - 1) res.iter_content() and 2) read the content only when res.headers['Content-Type'] == "application/x-ndjson" but no luck. It fails to stream the msgs.

Thank you!