From c82af479dd86f23ecf36a30ee7af7ceab96a915e Mon Sep 17 00:00:00 2001 From: awwaawwa <8493196+awwaawwa@users.noreply.github.com> Date: Fri, 14 Feb 2025 17:47:44 +0800 Subject: [PATCH] fix(rpc_doclayout): increase HTTP request timeout and enable redirect following - Extend timeout from 30 to 300 seconds - Add `follow_redirects=True` to handle potential redirects --- babeldoc/docvision/rpc_doclayout.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/babeldoc/docvision/rpc_doclayout.py b/babeldoc/docvision/rpc_doclayout.py index 142cb2e..e55f8a2 100644 --- a/babeldoc/docvision/rpc_doclayout.py +++ b/babeldoc/docvision/rpc_doclayout.py @@ -75,7 +75,8 @@ def predict_layout( "Content-Type": "application/msgpack", "Accept": "application/msgpack", }, - timeout=30, + timeout=300, + follow_redirects=True, ) logger.debug(f"Response status: {response.status_code}")