Closed zhengzheli closed 11 months ago
R
, run usethis::edit_r_environ()
and add / edit to read, e.g. TMPDIR=c:/tmp
in order to set R's directory for temporary files to a short pathname. Note this should be an absolute pathname and the folder should exist. Restart R before running the example above. devtools::install_github("rfhb/ctrdata")
, followed by the example above. @rfhb Thank you for your quick response and fix! I can confirm it works now.
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.
Please see the below code to reproduce:
(2/3) Converting to JSON, 1 records converted DEBUG: c:\cygwin\bin\bash.exe --noprofile --norc --noediting -c "PATH=/usr/local/bin:/usr/bin; \"/cygdrive/C/Users/ES-PHI~1/AppData/Local/R/WIN-LI~1/4.2/ctrdata/exec/EUCTR2~1.SH\" /cygdrive/C/Users/ES-PHI~1/AppData/Local/Temp/RTMPKF~1/CTRDAT~4" (3/3) Importing JSON records into database... DEBUG: C:\Users\ES-Philip\AppData\Local\Temp\Rtmpkf8Xvs\ctrDATA4838515e7a2b = Imported or updated 1 records on 1 trial(s)
Error in utils::unzip(zipfile = f, exdir = tempDir) : cannot open file 'C:/Users/ES-Philip/AppData/Local/Temp/Rtmpkf8Xvs/ctrDATA4838515e7a2b/Cartier.2019.Repeated Full-Face Aesthetic Combination Treatment With AbobotulinumtoxinA, Hyaluronic Acid Filler, and Skin-Boosting Hyaluronic Acid After Monotherapy With AbobotulinumtoxinA or Hyaluronic Acid Filler.pdf': No such file or directory
I believe it is related to this code in main.R