none
PublishWebService from R Server results in zip file creation error RRS feed

  • Question

  • Hi! I am trying to create a web service. I am running RStudio on an HDInsight Edge node in Azure. When I try the below code, I get this error, that I can not resolve:

    converting `inputSchema` to data frame sh: : command not found Error in packageEnv(exportenv, packages = packages, version = version) : Unable to create zip file

    What does this mean? Is this related to the zip ability? When I check it I get the following result:

    > Sys.which("zip")
               zip 
    "/usr/bin/zip" 

    Here is the code with which I try to create the web service:


    ws <- workspace(id = "<replaced_my_actual_workspace_id>", auth= "<replaced_my_actual_auth>", api_endpoint="https://europewest.studio.azureml.net", management_endpoint="https://management.azureml.net")


    library(lme4)
    library(AzureML)
    set.seed(1)

    train <- sleepstudy[1:80,]
    m <- lm(Reaction ~ Days + Subject, data = train)

    sleepyPredict <- function(newdata){
      predict(m, newdata=newdata)
    }

    ep <- publishWebService(ws, fun = sleepyPredict, name="sleepy lm",
                            inputSchema = sleepstudy,
                            data.frame=TRUE)

    Thanks for your help! To expedite things, on /RevolutionAnalytics/AzureML/blob/master/R/internal.R on github is the code that I think raises the error.

    Friday, September 2, 2016 9:43 AM

All replies

  • Any suggestions?
    Tuesday, September 6, 2016 8:09 AM
  • Hi, 

    Apologies for the delay. Can you try zipping any file on the edge node to see if that reproduces the same issue? For example: 

    zip export.zip <file> -r9Xq

    This runs the same command as the AzureML package.

    Thanks, 

    Scott

    Wednesday, October 19, 2016 8:46 PM