【问题标题】:Loading temporary .csv fails [duplicate]加载临时 .csv 失败 [重复]
【发布时间】:2020-01-15 02:29:38
【问题描述】:

我正在尝试加载一些 Internet 上可用的 .csv 文件(https url),但一直失败。

我的简单代码应该可以工作:

temp <- tempfile()
url <- "https://iotc.org/sites/default/files/documents/2019/06/IOTC-2018-DATASETS-CESurface.zip"
download.file(url, temp)

我明白了:

downloaded 0 bytes

Error in download.file(url, temp) : cannot download all files
In addition: Warning message:
In download.file(url, temp) :
  URL 'https://iotc.org/sites/default/files/documents/2019/06/IOTC-2018-DATASETS-CESurface.zip': status was '503 Service Unavailable'

这真的很奇怪,因为 url 有效(即文件下载没有任何问题)。你知道为什么它不起作用吗?

谢谢!

【问题讨论】:

    标签: r


    【解决方案1】:

    我刚刚检查过,该站点/文档受 cloudflare 保护。所以这应该是你的问题的原因。

    请检查此问题以获得答案:Cannot download file in R - status 503

    【讨论】:

    • 我就是这么想的,谢谢指点其他帖子!
    猜你喜欢
    • 2016-02-17
    • 1970-01-01
    • 2014-03-19
    • 2019-10-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多