locked
Error in loading 'rvest' package RRS feed

  • Question

  • Hi Team,

    I am trying to load rvest package into Azure ML. Initially I bundled and uploaded xml2 and rvest packages as per the following code.

    install.packages("src/xml2_0.1.2.zip", lib = ".", repos = NULL, verbose = TRUE)
    install.packages("src/rvest_0.3.1.zip", lib = ".", repos = NULL, verbose = TRUE)
    library(xml2, lib.loc=".", verbose=TRUE)
    library(rvest, lib.loc=".", verbose=TRUE)

    Both the packages got installed successfully. xml2 was attached successfully, but rvest failed.

    Then, as suggested in the forum here https://social.msdn.microsoft.com/Forums/azure/en-US/706c610f-dfd2-4e02-9978-b74f5345713e/issue-deploying-curl-into-azure-ml?forum=MachineLearning, I included selectr package also as per the following code.

    install.packages("src/selectr_0.2-3.zip", lib = ".", repos = NULL, verbose = TRUE)
    install.packages("src/xml2_0.1.2.zip", lib = ".", repos = NULL, verbose = TRUE)
    install.packages("src/rvest_0.3.1.zip", lib = ".", repos = NULL, verbose = TRUE)
    library(selectr, lib.loc=".", verbose=TRUE)
    library(xml2, lib.loc=".", verbose=TRUE)
    library(rvest, lib.loc=".", verbose=TRUE)

    Even now also I having issue in attaching rvest package. I am getting following error.

    Error 0063: The following error occurred during evaluation of R script:
    ---------- Start of error message from R ----------
    package or namespace load failed for 'rvest'

    package or namespace load failed for 'rvest'
    ----------- End of error message from R -----------
    Start time: UTC 05/11/2016 13:36:36
    End time: UTC 05/11/2016 13:36:48

    Please help in resolving this.

    Thanks.

    with regards,

    Parthiban

    Wednesday, May 11, 2016 1:48 PM

Answers

  • Hi Roope, it worked.

    Since httr was already available within Azure ML, I din't include it... But as you suggested, once I added that, it worked. Thanks a lot. Marking this as an answer...

    with regards,

    Parthiban

    Wednesday, May 11, 2016 5:37 PM

All replies

  • Hi Parthiban!

    The rvest package depends on a newer version of httr than what's pre-installed with Execute R module. Try adding httr_1.1.0.zip to your package, and install as follows:

    install.packages("src/selectr_0.2-3.zip", lib = ".", repos = NULL, verbose = TRUE)
    install.packages("src/xml2_0.1.2.zip", lib = ".", repos = NULL, verbose = TRUE)
    install.packages("src/httr_1.1.0.zip", lib = ".", repos = NULL, verbose = TRUE)
    install.packages("src/rvest_0.3.1.zip", lib = ".", repos = NULL, verbose = TRUE)
    library(httr, lib.loc=".", verbose=TRUE)
    library(selectr, lib.loc=".", verbose=TRUE)
    library(xml2, lib.loc=".", verbose=TRUE)
    library(rvest, lib.loc=".", verbose=TRUE)

    Hope this helps,

    Roope


    Wednesday, May 11, 2016 2:37 PM
  • Hi Roope, it worked.

    Since httr was already available within Azure ML, I din't include it... But as you suggested, once I added that, it worked. Thanks a lot. Marking this as an answer...

    with regards,

    Parthiban

    Wednesday, May 11, 2016 5:37 PM