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
I am trying to attach data to a task using python cvat-sdk. I have 125 images of size 700MB and I get error
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='app.cvat.ai', port=443): Max retries exceeded with url: /api/tasks/1301577/data/ (Caused by SSLError(SSLError(5, '[SYS] unknown error (_ssl.c:2417)')))
python version 3.12.7
cvat_sdk 2.32.0
code
self.sdk_config = Configuration(
host=CVAT_HOST,
api_key={"Authorization": f"Token {self.token}"}
)
def upload_images(self, task_id: int, image_dir: str) -> None:
image_files = [
os.path.join(image_dir, f)
for f in sorted(os.listdir(image_dir))
if os.path.splitext(f)[1].lower() in UPLOAD_EXTENSIONS
]
if not image_files:
raise ValueError(f"No valid images found in {image_dir}")
zip_path = os.path.join(image_dir, "upload.zip")
with zipfile.ZipFile(zip_path, "w", zipfile.ZIP_DEFLATED) as zipf:
for img in image_files:
zipf.write(img, arcname=os.path.basename(img))
print("send data")
with ApiClient(self.sdk_config) as client:
with open(zip_path, "rb") as f:
task_data = DataRequest(
image_quality=70,
client_files=[f],
compression="ZIP"
)
(result, _) = client.tasks_api.create_data(
task_id,
data_request=task_data,
_content_type="multipart/form-data",
_request_timeout=(300, 600)
)
os.remove(zip_path)
I tried to increase the _request_timeout param but didnt work. If i upload batches of 50 images it works but it creates different jobs and i want them all in one.
Thank you in advance
The text was updated successfully, but these errors were encountered:
Hello team,
I am trying to attach data to a task using python cvat-sdk. I have 125 images of size 700MB and I get error
code
I tried to increase the
_request_timeout
param but didnt work. If i upload batches of 50 images it works but it creates different jobs and i want them all in one.Thank you in advance
The text was updated successfully, but these errors were encountered: