medizininformatik-initiative/Projectathon6-miracum1

Problem writing ZIP File on Windows Maschine (step2)

FloSeidel opened this issue · 1 comments

While running the whole step2 calculation I encountered a problem at the end while writing the zipfile. No Error was given but no zip file was created.

Setup:

  • RStudio
  • R 4.2.2
  • Windows Server 2019

We found the following solution while debugging (thanks @NandhiniS08 and @mematt)
Solution:
change the following code from the file ./Projectathon6-miracum1/step2/6_modeling_gamboost.R:

...
zip_file_name <- paste('westorm-step2-results-', conf$site, "-", Sys.Date(), "-coverage-", min(year), "-", max(year), "-totalcases-", sum(daily$total_count),  sep = "")
zip(zipfile = file.path(getwd(),'results', zip_file_name), files = files2zip, extras = '-j')
...

First we had to install the zip package:

install.packages("zip")
library(zip)

and than alter the lines above:

# adding the .zip extension
zip_file_name <- paste('westorm-step2-results-', conf$site, "-", Sys.Date(), "-coverage-", min(year), "-", max(year), "-totalcases-", sum(daily$total_count), ".zip",  sep = "")

# changing method
zip::zipr(zipfile = file.path(getwd(), 'results', zip_file_name), files = files2zip)

Hope nobody has this problem or can solve it with this :)

Dear @FloSeidel,

Thank you for raising this issue, providing the solution and for the debugging session. :)

We will leave this solution separately, as it had not occurred during the test phase at other sites and incorporating the library(zip) into the docker(hub) images would require substantial changes and potential novel errors.