The type 'JArray' is not supported RRS feed

  • Question

  • Hi,

    I am using Machine Learning Server version 9.3.0. I have published a service in R using mrsdeploy. The service has an input of type data.frame, and an output of the same type. When I try to call the service from my Python code using the DeployClient package. I get the following error: 

    400 Client Error: Bad Request for url:
    Traceback (most recent call last):
      File "C:\Program Files\Microsoft\ML Server\PYTHON_SERVER\lib\site-packages\azureml\common\", line 266, in __send
      File "C:\Program Files\Microsoft\ML Server\PYTHON_SERVER\lib\site-packages\requests\", line 935, in raise_for_status
        raise HTTPError(http_error_msg, response=self)
    requests.exceptions.HTTPError: 400 Client Error: Bad Request for url:

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "", line 43, in <module>
        result = svc.scoreCallisto(loanstoinvest_df)
      File "C:\Program Files\Microsoft\ML Server\PYTHON_SERVER\lib\site-packages\azureml\deploy\server\", line 107, in scoreCallisto
        return self._consume(props)
      File "C:\Program Files\Microsoft\ML Server\PYTHON_SERVER\lib\site-packages\azureml\deploy\server\", line 319, in _consume
        response =, json=body).json()
      File "C:\Program Files\Microsoft\ML Server\PYTHON_SERVER\lib\site-packages\azureml\common\", line 193, in post
        return self.__send('POST', resource_path, data=data, json=json, headers=headers, raw_response=raw_response, **kwargs)
      File "C:\Program Files\Microsoft\ML Server\PYTHON_SERVER\lib\site-packages\azureml\common\", line 270, in __send
        raise HttpException(resp=response)
    azureml.common.http_client.HttpException: (400)
    Reason: Bad Request
    HTTP response headers: {'Date': 'Sat, 13 Oct 2018 22:10:21 GMT', 'x-ms-request-id': '503bac1b-acc3-430d-8513-4cfc922c41dc', 'Server': 'Kestrel', 'Content-Type': 'application/json', 'Content-Length': '140', 'X-Content-Type-Options': 'nosniff'}
    HTTP response body: {"Link":"","Message":"The type 'JArray' is not supported","ExceptionType":"ArgumentException"} 

    Thanks in advance for your help.

    Saturday, October 13, 2018 10:24 PM

All replies

  • When you deploy a service via mrsdeploy, you should get a Swagger definition of the service and its methods. Wouldn't that definition show how to pass in the data?

    Also, when you pass in the data you have to pass it in column format, not row format. Look at Hoong Oi's answer here.

    Niels | @nielsberglund

    • Edited by nielsbMVP Monday, October 15, 2018 2:57 AM
    Monday, October 15, 2018 2:57 AM
  • Hi, 

    Thanks for your reply. I use pandas in Python to read a csv file in to a data frame (panads.read_csv), then I pass the data frame as an argument to the method of my web service. I don't use Swagger, I try to use DeployService package in my Python code to get hold of the service, and call its method. By the way I deployed the service using mrsdeploy in R.


    Monday, October 15, 2018 12:11 PM