rvest read_html导致某些链接的核心转储

时间:2018-07-16 07:11:09

标签: r rvest

请参见下面的代码。对于某些链接,这导致R执行核心转储。 我刚刚插入了一个示例链接,这可能有助于调试

操作系统为Ubuntu 16.04.4 LTS(GNU / Linux 4.4.0-75-通用x86_64)

>R

R version 3.3.3 (2017-03-06) -- "Another Canoe"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> packageVersion("rvest")
[1] ‘0.3.2’
> link <- 'https://www.xerox.com/en-us/digital-printing/custom-print-production'
> library(rvest)
Loading required package: xml2
> result <- read_html(link)
*** %n in writable segment detected ***
Aborted (core dumped)

注意:

  1. 相同的链接在Mac上正常工作

  2. 许多其他链接在Ubuntu上也能正常工作

1 个答案:

答案 0 :(得分:0)

xml2较旧

packageVersion(“ xml2”) [1]‘1.1.1’ 更新至1.2.0后,错误消失了