locked
Issue deploying Curl into Azure ML RRS feed

  • Question

  • I'm trying to install the Curl package into my Azure ML environment but cannot make it work. Other packages work fine. I'm following the approach describe here

    http://blogs.msdn.com/b/benjguin/archive/2014/09/24/how-to-upload-an-r-package-to-azure-machine-learning.aspx

    This is the error msg I keep receiving. Any help is appreciated. 

    [ModuleOutput] [1] "Loading variable port1..."
    [ModuleOutput] 
    [ModuleOutput] package 'httr' successfully unpacked and MD5 sums checked
    [ModuleOutput] 
    [ModuleOutput] package 'xml2' successfully unpacked and MD5 sums checked
    [ModuleOutput] 
    [ModuleOutput] package 'rvest' successfully unpacked and MD5 sums checked
    [ModuleOutput] 
    [ModuleOutput] package 'RCurl' successfully unpacked and MD5 sums checked
    [ModuleOutput] 
    [ModuleOutput] Loading required package: bitops
    [ModuleOutput] 
    [ModuleOutput] Error in inDL(x, as.logical(local), as.logical(now), ...) : 
    [ModuleOutput] 
    [ModuleOutput]   unable to load shared object 'C:/RCurl/libs/x64/RCurl.dll':
    [ModuleOutput] 
    [ModuleOutput]   LoadLibrary failure:  A dynamic link library (DLL) initialization routine failed.
    [ModuleOutput] 
    [ModuleOutput] 
    [ModuleOutput] 
    [ModuleOutput] In addition: Warning messages:
    [ModuleOutput] 
    [ModuleOutput] 1: In strptime(x, format, tz = tz) :
    [ModuleOutput] 
    [ModuleOutput]   unable to identify current timezone 'C':
    [ModuleOutput] 
    [ModuleOutput] please set environment variable 'TZ'
    [ModuleOutput] 
    [ModuleOutput] 2: In strptime(x, format, tz = tz) : unknown timezone 'localtime'
    [ModuleOutput] 
    [ModuleOutput] 3: package 'httr' was built under R version 3.2.3 
    [ModuleOutput] 
    [ModuleOutput] 4: package 'xml2' was built under R version 3.2.3 
    [ModuleOutput] 
    [ModuleOutput] 5: package 'rvest' was built under R version 3.2.3 
    [ModuleOutput] 
    [ModuleOutput] 6: package 'RCurl' was built under R version 3.2.3 
    [ModuleOutput] 
    [Stop]     DllModuleMethod::Execute. Duration = 00:00:13.3281654
    [Critical]     Error: Error 0063: The following error occurred during evaluation of R script:
    ---------- Start of error message from R ----------
    package or namespace load failed for 'RCurl'
    
    
    package or namespace load failed for 'RCurl'
    ----------- End of error message from R -----------
    [Critical]     {"InputParameters":{"DataTable":[{"Rows":7707,"Columns":2,"estimatedSize":18579456,"ColumnTypes":{"System.String":2},"IsComplete":true,"Statistics":{"0":[7707,0],"1":[7707,0]}}],"Generic":{"bundlePath":"..\\..\\Script Bundle\\Script Bundle.zip"},"Unknown":["Key: rStreamReader, ValueType : System.IO.StreamReader"]},"OutputParameters":[],"ModuleType":"ExecuteRScript","ModuleVersion":" Version=6.0.0.0","AdditionalModuleInfo":"ExecuteRScript, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca;Microsoft.MetaAnalytics.RDataSupport.ExecuteRScript;Run","Errors":"Microsoft.Analytics.Exceptions.ErrorMapping+ModuleException: Error 0063: The following error occurred during evaluation of R script:\r\n---------- Start of error message from R ----------\r\npackage or namespace load failed for 'RCurl'\r\n\r\n\r\npackage or namespace load failed for 'RCurl'\r\n----------- End of error message from R -----------\r\n   at Microsoft.MetaAnalytics.RDataSupport.ExecuteRScript.ExecuteR(RWorker worker, DataTable dataset1, DataTable dataset2, String bundlePath, StreamReader rStreamReader, Nullable`1 seed) in d:\\_Bld\\8839\\6603\\Sources\\Product\\Source\\Modules\\LanguageWorker\\RSupport\\ExecuteRScript.Dll\\RModule.cs:line 150\r\n   at Microsoft.MetaAnalytics.RDataSupport.ExecuteRScript.RunImpl(DataTable dataset1, DataTable dataset2, String bundlePath, StreamReader rStreamReader, Nullable`1 seed) in d:\\_Bld\\8839\\6603\\Sources\\Product\\Source\\Modules\\LanguageWorker\\RSupport\\ExecuteRScript.Dll\\RModule.cs:line 44\r\n   at Microsoft.MetaAnalytics.RDataSupport.ExecuteRScript.Run(DataTable dataset1, DataTable dataset2, String bundlePath, StreamReader rStreamReader, Nullable`1 seed) in d:\\_Bld\\8839\\6603\\Sources\\Product\\Source\\Modules\\LanguageWorker\\RSupport\\ExecuteRScript.Dll\\RModuleEntryPoint.cs:line 94","Warnings":[],"Duration":"00:00:13.3180882"}
    Module finished after a runtime of 00:00:13.7044300 with exit code -2
    Module failed due to negative exit code of -2

    Monday, February 1, 2016 5:56 PM

Answers

  • Issue was with rvest package as it requires selectr, which must be loaded manually.

    install.packages("src/httr_1.1.0.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)
    install.packages("src/selectr_0.2-3.zip", lib = ".", repos = NULL, verbose = TRUE)

    library(httr, lib.loc=".", verbose=TRUE)
    library(xml2, lib.loc=".", verbose=TRUE)
    library(rvest, lib.loc=".", verbose=TRUE)
    library(selectr, lib.loc=".", verbose=TRUE)

    library(RCurl)
    library(dplyr)

    • Marked as answer by Dirk_LX Monday, February 1, 2016 7:15 PM
    Monday, February 1, 2016 7:15 PM

All replies

  • Hi Dirk_LX,

    The last time I checked, RCurl was already pre-installed in Azure ML. You can check the latest list of pre-installed packages using the following script within your 'Execute R Script' module:

    data <- data.frame(installed.packages())
    # Select data.frame to be sent to the output Dataset port
    maml.mapOutputPort("data");

    Here is some documentation on the list of pre-installed packages in R: https://azure.microsoft.com/en-us/documentation/articles/machine-learning-extend-your-experiment-with-r/

    Could you re-run your script without trying to install RCurl?

    Regards,
    Jaya.

    Monday, February 1, 2016 6:07 PM
  • Hi Jaya,

    I tried using library(RCurl) instead and it now loads. Except my code now breaks with the following error (see below). Is it possible that this is due to different versions?

    Regards, Dirk

    [ModuleOutput] 
    [Stop]     DllModuleMethod::Execute. Duration = 00:00:25.5655100
    [Critical]     Error: Error 0063: The following error occurred during evaluation of R script:
    ---------- Start of error message from R ----------
    there is no package called 'selectr'
    
    
    there is no package called 'selectr'
    ----------- End of error message from R -----------
    [Critical]     {"InputParameters":{"DataTable":[{"Rows":7707,"Columns":2,"estimatedSize":18563072,"ColumnTypes":{"System.String":2},"IsComplete":true,"Statistics":{"0":[7707,0],"1":[7707,0]}}],"Generic":{"bundlePath":"..\\..\\Script Bundle\\Script Bundle.zip"},"Unknown":["Key: rStreamReader, ValueType : System.IO.StreamReader"]},"OutputParameters":[],"ModuleType":"ExecuteRScript","ModuleVersion":" Version=6.0.0.0","AdditionalModuleInfo":"ExecuteRScript, Version=6.0.0.0, Culture=neutral, PublicKeyToken=69c3241e6f0468ca;Microsoft.MetaAnalytics.RDataSupport.ExecuteRScript;Run","Errors":"Microsoft.Analytics.Exceptions.ErrorMapping+ModuleException: Error 0063: The following error occurred during evaluation of R script:\r\n---------- Start of error message from R ----------\r\nthere is no package called 'selectr'\r\n\r\n\r\nthere is no package called 'selectr'\r\n----------- End of error message from R -----------\r\n   at Microsoft.MetaAnalytics.RDataSupport.ExecuteRScript.ExecuteR(RWorker worker, DataTable dataset1, DataTable dataset2, String bundlePath, StreamReader rStreamReader, Nullable`1 seed) in d:\\_Bld\\8839\\6603\\Sources\\Product\\Source\\Modules\\LanguageWorker\\RSupport\\ExecuteRScript.Dll\\RModule.cs:line 150\r\n   at Microsoft.MetaAnalytics.RDataSupport.ExecuteRScript.RunImpl(DataTable dataset1, DataTable dataset2, String bundlePath, StreamReader rStreamReader, Nullable`1 seed) in d:\\_Bld\\8839\\6603\\Sources\\Product\\Source\\Modules\\LanguageWorker\\RSupport\\ExecuteRScript.Dll\\RModule.cs:line 44\r\n   at Microsoft.MetaAnalytics.RDataSupport.ExecuteRScript.Run(DataTable dataset1, DataTable dataset2, String bundlePath, StreamReader rStreamReader, Nullable`1 seed) in d:\\_Bld\\8839\\6603\\Sources\\Product\\Source\\Modules\\LanguageWorker\\RSupport\\ExecuteRScript.Dll\\RModuleEntryPoint.cs:line 94","Warnings":[],"Duration":"00:00:25.5558305"}
    Module finished after a runtime of 00:00:25.9451081 with exit code -2
    Module failed due to negative exit code of -2

    Monday, February 1, 2016 6:49 PM
  • Hi Dirk,

    Ok, now it seems to state that the code need the 'selectr' package?

    Do you need to install this package as well?

    Regards,
    Jaya.

    Monday, February 1, 2016 7:05 PM
  • Issue was with rvest package as it requires selectr, which must be loaded manually.

    install.packages("src/httr_1.1.0.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)
    install.packages("src/selectr_0.2-3.zip", lib = ".", repos = NULL, verbose = TRUE)

    library(httr, lib.loc=".", verbose=TRUE)
    library(xml2, lib.loc=".", verbose=TRUE)
    library(rvest, lib.loc=".", verbose=TRUE)
    library(selectr, lib.loc=".", verbose=TRUE)

    library(RCurl)
    library(dplyr)

    • Marked as answer by Dirk_LX Monday, February 1, 2016 7:15 PM
    Monday, February 1, 2016 7:15 PM