ropensci / drake

An R-focused pipeline toolkit for reproducibility and high-performance computing
https://docs.ropensci.org/drake
GNU General Public License v3.0
1.34k stars 128 forks source link

Error: key 'seed' ('session') not found #1364

Closed DRJP closed 3 years ago

DRJP commented 3 years ago

First of all, many thanks for the drake package - we have been using it for the last 6 months and it has been a really valuable tool for collaboration.

I have a new student for whom drake is failling to perform the most basic tasks. She is using Windows 10 on a French laptop, and she is using Rstudio.

For example, the following code

library(drake)
test_plan <- drake_plan(
  dateToday = date()
)
make(test_plan)

The above script works fine on my Ubuntu laptop, but generates various error messages on her windows laptop.

Error message 1 In a fresh R session it will generate Erreur : key 'seed' ('session') not found

Error message 2 If we subsequently rerun make() with a seed we get a similar error make(test_plan, seed=1) Erreur : key '59f30ef5d215bd12' ('memoize') not found

Error message 3 If we restart Rstudio and run make with a seed (to avoid error 1) we first get a different error make(test_plan, seed=1) Error in if (!is_encoded_path(target)) { : valeur manquante là où TRUE / FALSE est requis Subsequently rerunning make (with a seed set) will result in error message 2.

Here is her path setwd("C:/Users/Mahé/Desktop/ASF_challenge/asf-speed/src")

Here is her sessionInfo

> sessionInfo()
R version 4.0.4 (2021-02-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)

Matrix products: default

locale:
[1] LC_COLLATE=French_France.1252  LC_CTYPE=French_France.1252    LC_MONETARY=French_France.1252
[4] LC_NUMERIC=C                   LC_TIME=French_France.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base    

loaded via a namespace (and not attached):
[1] compiler_4.0.4 tools_4.0.4    tinytex_0.30   xfun_0.22

We're quite confused about how to proceed. Any suggestions would be warmly welcome.

Best regards David

DRJP commented 3 years ago

We've made a few more tests and think that the issue is related to the accented character in the file path. We've successfully run this example using an alternative path without accents.

wlandau commented 3 years ago

Glad you figured it out. On Windows, it is sometimes necessary to select a different encoding option, e.g. options(encoding = "UTF-8"). Thread: https://github.com/ropensci/targets/issues/249.