【问题标题】:Error with pkgdown build_site() related to YAML serializer与 YAML 序列化程序相关的 pkgdown build_site() 出错
【发布时间】:2019-01-05 11:43:56
【问题描述】:

当我运行pkgdown::build_site() 时,我收到以下错误:

Error in .Call(C_serialize_to_yaml, x, line.sep, indent, omap, column.major,  : 
  Incorrect number of arguments (9), expecting 8 for 'serialize_to_yaml'
Calls: withCallingHandlers ... <Anonymous> -> <Anonymous> -> .handleSimpleError -> h
Execution halted
Error in .Call(C_serialize_to_yaml, x, line.sep, indent, omap, column.major,  : 
  Incorrect number of arguments (9), expecting 8 for 'serialize_to_yaml'

按照函数链,我发现问题似乎是在调用yaml::as.yaml(meta)时触发的。这是一种无需整个包即可重现错误的快速方法(请注意,meta 是由 pkgdown 以这种形式创建的):

meta <- list(
     pandoc = "2.2.2.1",
     pkgdown = "1.1.0",
     pkgdown_sha = NULL,
     articles = list(
         intermediate = "intermediate.html",
         introduction = "introduction.html")
)
yaml::as.yaml(meta)

这是我的会话信息,以防万一:

R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

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

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

other attached packages:
[1] yaml_2.2.0    pkgdown_1.1.0

loaded via a namespace (and not attached):
 [1] roxygen2_6.1.0   Rcpp_0.12.18     digest_0.6.15    crayon_1.3.4     rprojroot_1.3-2 
 [6] assertthat_0.2.0 commonmark_1.5   MASS_7.3-50      R6_2.2.2         backports_1.1.2 
[11] magrittr_1.5     stringi_1.2.4    rlang_0.2.1      rstudioapi_0.7   fs_1.2.4        
[16] xml2_1.2.0       desc_1.2.0       tools_3.5.1      stringr_1.3.1    compiler_3.5.1  
[21] memoise_1.1.0   

【问题讨论】:

    标签: r yaml pkgdown


    【解决方案1】:

    删除并重新安装 yaml 包解决了这个问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-09
      • 1970-01-01
      • 2016-01-28
      • 2017-03-09
      相关资源
      最近更新 更多