You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Investigate occasional JSONDecodeError in integration tests #672
The issue can be reproduced by bombing API. Start some long running actor run and run for example code like this:
from apify_client import ApifyClientAsync
import asyncio
async def main():
client = ApifyClientAsync(token="...")
run_client= client.run(run_id='ACTOR__RUN_ID')
tasks = []
for i in range(1000):
tasks.append(asyncio.create_task(run_client.wait_for_finish()))
await asyncio.gather(*tasks)
if __name__ == '__main__':
asyncio.run(main())
Initially it just keeps polling for the actor run. After a while the rate limiter kicks in and there is 429 response with API rate limit error, but after that the API starts returning 200 response with empty bytes, which causes the error in the Python client.
Activity
Pijukatel commentedon Nov 10, 2025
The issue can be reproduced by bombing API. Start some long running actor run and run for example code like this:
Initially it just keeps polling for the actor run. After a while the rate limiter kicks in and there is
429 responsewith API rate limit error, but after that the API starts returning200 responsewith empty bytes, which causes the error in the Python client.raethlo commentedon Nov 12, 2025
Note: @danpoletaev is investigating, so far we were unable to repro, we're looking if this could be a python client issue.
Pijukatel commentedon Nov 12, 2025
Possibly an Impit issue. In touch with @barjin
fix: raise Python exception on response body read error (#313)
fix: treat unexpected EOF error as `RemoteProtocolError` (#314)
Update impit to solve the error observed in downstream repo
fix: Update impit to fix rare `JSONDecodeError` (#536)
fix: Update apify client to fix rare `JSONDecodeError` (#679)