rfhb / ctrdata

Aggregate and analyse information on clinical trials from public registers
https://rfhb.github.io/ctrdata/
Other
43 stars 6 forks source link

Certain result documents are causing an error: "No such file or directory" #30

Closed zhengzheli closed 11 months ago

zhengzheli commented 11 months ago

Please see the below code to reproduce:

 dbc <- nodbi::src_mongo(collection = "test2", db = "db")
 q <- "https://www.clinicaltrialsregister.eu/ctr-search/search?query=2014-001203-50"
 ctrLoadQueryIntoDb(
   queryterm = q,
   con = dbc,
   euctrresults = TRUE,
   documents.path = "d",
   verbose = TRUE,
 )

I believe it is related to this code in main.R

          tmp <- utils::unzip(
            zipfile = f,
            exdir = tempDir)
          if (is.null(tmp)) return(NULL)
rfhb commented 11 months ago
zhengzheli commented 11 months ago

@rfhb Thank you for your quick response and fix! I can confirm it works now.

rfhb commented 6 months ago

R 4.3 may permit much longer file path names, see https://blog.r-project.org/2023/03/07/path-length-limit-on-windows/index.html, hence the issue reported here may also be addressed.