JGCRI / gcamdata

The GCAM data system
https://jgcri.github.io/gcamdata/
Other
44 stars 26 forks source link

Error when first building GCAM data system #1176

Closed ting881003 closed 2 years ago

ting881003 commented 3 years ago

devtools::load_all() ℹ Loading gcamdata

library(gcamdata) driver(write_output=FALSE, write_xml=TRUE) GCAM Data System v5.1 Found 366 chunks Found 3678 chunk data requirements Found 2069 chunk data products 1263 chunk data input(s) not accounted for Chunks left: 1629 Error in UseMethod("collector_value") :
沒有適用的方法可將 'collector_value' 套用到 "c('collector_number', 'collector')" 類別的物件 錯誤發生在 load_csv_files(unfound_chunk$input, unfound_chunk$optional, quiet = TRUE): Error or warning while reading A_ff_RegionalSubsector.csv Called from: load_csv_files(unfound_chunk$input, unfound_chunk$optional, quiet = TRUE)

rubcalvo commented 3 years ago

I have encounter a similar issue when trying to build gcamdata for the first time. I have tried this both on mac and windows. The error is almost the same.

I've read on closed issues that the problem can be originated because incompatibilities between gcamdata and dplyr version (versions < 1.0 seems to work fine). But, I have been not able to install previous versions of dplyr, since I run install.packages('dplyr', version ="0.8.5") and R install version 1.0.7 instead.

driver() GCAM Data System v5.1 Found 354 chunks Found 3351 chunk data requirements Found 1911 chunk data products 1118 chunk data input(s) not accounted for Chunks left: 1472 Error in UseMethod("collector_value") :
no applicable method for 'collector_value' applied to an object of class "c('collector_number', 'collector')" Error in load_csv_files(unfound_chunk$input, unfound_chunk$optional, quiet = TRUE) : Error or warning while reading A23.elecS_stubtech_energy_inputs.csv

sessionInfo() R version 4.1.1 (2021-08-10) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19043)

Matrix products: default

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

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

other attached packages: [1] dplyr_1.0.7 gcamdata_5.1

loaded via a namespace (and not attached): [1] rstudioapi_0.13 magrittr_2.0.1 hms_1.1.0 tidyselect_1.1.1 bit_4.0.4 R6_2.5.1
[7] rlang_0.4.11 fansi_0.5.0 tools_4.1.1 parallel_4.1.1 data.table_1.14.0 vroom_1.5.5
[13] utf8_1.2.2 withr_2.4.2 ellipsis_0.3.2 bit64_4.0.5 assertthat_0.2.1 tibble_3.1.4
[19] lifecycle_1.0.0 crayon_1.4.1 purrr_0.3.4 readr_2.0.1 tzdb_0.1.2 tidyr_1.1.3
[25] vctrs_0.3.8 glue_1.4.2 compiler_4.1.1 pillar_1.6.2 generics_0.1.0 pkgconfig_2.0.3

pkyle commented 3 years ago

I don't know what happened with the first issue here (never had that specific issue with A_ff_RegionalSubsector.csv, and the error message isn't informative to me), but the second one (from 1 hour ago) is that the way to install a specific version of a package is to use the devtools function install_version. install_version("dplyr", "0.8.5")