EnergyEconomyDecoupling / PFUPipeline

Primary, Final, and Useful energy and exergy for 1960-2019
https://energyeconomydecoupling.github.io/PFUPipeline/
Other
3 stars 0 forks source link

r_make() failing at the 'Specified' stage of the workflow. #3

Closed ZekeMarshall closed 4 years ago

ZekeMarshall commented 4 years ago

Hi Matt,

I'm trying to generate the World FU etas template. When i run r_make() i recieve the error below. Additionally when I run vis_drake_graph() the 'Specified' node in the dependency graph comes up as having failed.

I'd appreciate any help getting this up and running!

Cheers,

Zeke


Stack trace:

 Process 10624:  1. (function (r_args = list()) ...  2. drake:::r_make(r_args = r_args)  3. drake:::r_drake(source, drake::make_impl, list(), r_fn, r_args)  4. base:::do.call(r_fn, r_args)  5. (function (func, args = list(), libpath = .libPaths(), repos = default_repos(), ...  6. callr:::get_result(output = out, options)  7. throw(newerr, parent = remerr[[2]])

 x callr subprocess failed: target Specified_1532e3ca failed. diagnose(Specified_1532e3ca)error$message:  'paste_pref_suff' is not an exported object from 'namespace:matsbyname' diagnose(Specified_1532e3ca)error$calls:   1. -global::specify(BalancedIEAData, countries)   2.  -filter(BalancedIEAData, Country %in% countries) %>% specify_all()    3.     +-base::withVisible(eval(quote(_fseq(_lhs)), env, env))    4.     -base::eval(quote(_fseq(_lhs)), env, env)    5.       -base::eval(quote(_fseq(_lhs)), env, env)    6.         -_fseq(_lhs)    7.           -magrittr::freduce(value, _function_list)   8.       +-base::withVisible(function_list[k])   9.       -function_list[k]  10.        -IEATools::specify_all(.)   11.                 -%>%(...)   12.                   +-base::withVisible(eval(quote(_fseq(_lhs)), env, env))   13.                   -base::eval(quote(_fseq(_lhs)), env, env)   14.                     -base::eval(quote(_fseq(_lhs)), env, env)   15.                       -IEATools:::_fseq(_lhs)   16.                         -magrittr::freduce(value, _function_list)  17.              -function_list[i]  18.               -IEATools::specify_primary_production(.)  19.                -IEATools:::specify_primary_func(...)  20.                 -matsbyname::paste_pref_suff  21.                  -base::getExportedValue(pkg, name)  22.                   -base::stop(...) 

 Process 2008:  19. (function (source, d_fn, d_args) ...  20. base:::do.call(d_fn, d_args)  21. (function (config) ...  22. drake:::process_targets(config)  23. drake:::run_backend(config)  24. drake:::drake_backend(config)  25. drake:::drake_backend_loop(config)  26. drake:::loop_check(config)  27. drake:::local_build(target = targets[1], config = config, downstream = targets[-1])  28. drake:::conclude_build(build, config)  29. drake:::conclude_build_impl(value, target, meta, config)  30. drake:::conclude_build_impl.default(value, target, meta, config)  31. drake:::handle_build_exceptions(target = target, meta = meta, ...  32. drake:::handle_build_error(target, meta, config)  33. drake:::log_failure(target, meta, config)  34. drake:::stop0(msg)  35. base:::stop(..., call. = FALSE)  36. base:::.handleSimpleError(function (e) ...  37. h(simpleError(msg, call))

 x target Specified_1532e3ca failed. diagnose(Specified_1532e3ca)error$message:  'paste_pref_suff' is not an exported object from 'namespace:matsbyname' diagnose(Specified_1532e3ca)error$calls:   1. -global::specify(BalancedIEAData, countries)   2.  -filter(BalancedIEAData, Country %in% countries) %>% specify_all()    3.     +-base::withVisible(eval(quote(_fseq(_lhs)), env, env))    4.     -base::eval(quote(_fseq(_lhs)), env, env)    5.       -base::eval(quote(_fseq(_lhs)), env, env)    6.         -_fseq(_lhs)    7.           -magrittr::freduce(value, _function_list)   8.       +-base::withVisible(function_list[k])   9.       -function_list[k]  10.        -IEATools::specify_all(.)   11.                 -%>%(...)   12.                   +-base::withVisible(eval(quote(_fseq(_lhs)), env, env))   13.                   -base::eval(quote(_fseq(_lhs)), env, env)   14.                     -base::eval(quote(_fseq(_lhs)), env, env)   15.                       -IEATools:::_fseq(_lhs)   16.                         -magrittr::freduce(value, _function_list)  17.              -function_list[i]  18.               -IEATools::specify_primary_production(.)  19.                -IEATools:::specify_primary_func(...)  20.                 -matsbyname::paste_pref_suff  21.                  -base::getExportedValue(pkg, name)  22.                   -base::stop(...) 

MatthewHeun commented 4 years ago

The key piece is

'paste_pref_suff' is not an exported object from 'namespace:matsbyname'

Looks like I added some features to the matsbyname package that have not made it to a released version. Sorry about this. I'll put out a new release of matsbyname later today.

ZekeMarshall commented 4 years ago

Hi Matt,

Thanks for looking into this. I'll watch out for the new release and give it another go later today!

Cheers,

Zeke

MatthewHeun commented 4 years ago

I just submitted an updated version to CRAN. I'll close this issue when the new version is ready.

MatthewHeun commented 4 years ago

I have published v0.4.15matsbyname. You can probably get it from CRAN. If that doesn't work, you can always get it from GitHub: devtools::install_github("MatthewHeun/matsbyname")

Using the new version of matsbyname should solve this issue, so I'm closing it now.

ZekeMarshall commented 4 years ago

r_make() and vis_drake_graph() are both now executing correctly. Thanks Matt!