【问题标题】:edgarWebR started giving error related to xml2 packageedgarWebR 开始给出与 xml2 包相关的错误
【发布时间】:2020-04-08 11:57:28
【问题描述】:

这在 2 月中旬有效,但从昨天开始就停止了。看起来随后可能对 xml2 进行了一些更新,不确定这是否是一个因素。

图书馆(edgarWebR)

filing_list <- 
  edgarWebR::company_filings(
    as.character("AAPL"), 
    ownership = FALSE, 
    type = "10-K", 
    before = "2020207", 
    count = 40, 
    page = 1)

xml2::url_absolute(res[[ref]], xml2::xml_url(doc)) 中的错误:基本 URL 的长度必须为 1

使用 xml2 1.3.0 和 edgarWebR 1.0.1,但也尝试了两者的早期版本。

提出了 edgarWebR 的问题,但我们将不胜感激。

【问题讨论】:

    标签: r xml2


    【解决方案1】:

    我遇到了同样的问题,你的帖子实际上帮助我解决了这个问题。

    1:进入 RStudio 上的“包”并删除所有版本的 xml2 包。

    2:重启R

    3:运行这几行代码:

    需要(开发工具)

    install_version("xml2", version = "1.2.2", repos = "http://cran.us.r-project.org")

    更多信息在这里https://support.rstudio.com/hc/en-us/articles/219949047-Installing-older-versions-of-packages

    【讨论】:

      【解决方案2】:

      edgarWebR 的作者在这里 - 我做了一些调试,这是我打开的 xml2 中的问题,一旦修复,应该允许使用当前版本 - https://github.com/r-lib/xml2/issues/300

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-06-21
        • 1970-01-01
        • 1970-01-01
        • 2020-08-16
        • 2010-09-17
        • 1970-01-01
        相关资源
        最近更新 更多