From ca3d60c1ae48252c4efaad6df711405d65a61d66 Mon Sep 17 00:00:00 2001 From: carlosuc3m <100329787@alumnos.uc3m.es> Date: Thu, 3 Oct 2024 15:02:13 +0200 Subject: [PATCH] correct error unzipping --- .../modelrunner/bioimageio/download/DownloadModel.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/bioimage/modelrunner/bioimageio/download/DownloadModel.java b/src/main/java/io/bioimage/modelrunner/bioimageio/download/DownloadModel.java index 7f5c996a..379370d5 100644 --- a/src/main/java/io/bioimage/modelrunner/bioimageio/download/DownloadModel.java +++ b/src/main/java/io/bioimage/modelrunner/bioimageio/download/DownloadModel.java @@ -489,7 +489,9 @@ private void unzipTfWeights() throws IOException { String source = descriptor.getWeights().gettAllSupportedWeightObjects().stream() .filter(ww -> ww.getFramework().equals(EngineInfo.getBioimageioTfKey())) .findFirst().get().getSource(); - source = DownloadModel.getFileNameFromURLString(source); + try { + source = DownloadModel.getFileNameFromURLString(source); + } catch (Exception ex) {} System.out.println("Unzipping model..."); unzippingConsumer.accept(0.); ZipUtils.unzipFolder(this.modelsDir + File.separator + source, this.modelsDir,