Skip to content

Getting error while sending test data using curl in local server #2

@Abhijit5676

Description

@Abhijit5676

Getting error while sending test data using curl in local server
app.py: return self.view_functionsrule.endpoint
File "app.py", line 28, in get_prediction
data = np.array(data)[np.newaxis, :] # converts shape from (4,) to (1, 4)
IndexError: too many indices for array
127.0.0.1 - - [31/Mar/2020 16:06:23] "�[35m�[1mPOST /predict HTTP/1.1�[0m" 500 -
_

Curl post: _curl -X POST 127.0.0.1:5000/predict -H 'Content-Type:application/json' -d '[5.9,3.0,5.1,1.8]'

<title>500 Internal Server Error</title>

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

_

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions