How to resolve octave machine learning submission error?

1.4k Views Asked by At

How to resolve submission error:

curl: (6) Couldn't resolve host 'www-origin.coursera.org'
m =  15
error] submission with curl() was not successful

!! Submission failed: Grader sent no response



Function: submitWithConfiguration>validateResponse
FileName: C:\Users\admin\Desktop\ex7\lib\submitWithConfiguration.m
LineNumber: 158 
3

There are 3 best solutions below

0
On

it looks like the code is fine and the problem is that your computer can't connect to the internet. You can simply solve this by using a VPN. Good luck!

0
On

This error is probably caused because your computer is not able to connect to the internet at the moment. This is the function working behind collecting the data from the online grader.

    function response = validateResponse(resp)
  % test if the response is json or an HTML page
  isJson = length(resp) > 0 && resp(1) == '{';
  isHtml = findstr(lower(resp), '<html');

  if (isJson)
    response = resp;
  elseif (isHtml)
    % the response is html, so its probably an error message
    printHTMLContents(resp);
    error('Grader response is an HTML message');
  else
    error('Grader sent no response');
  end
end

Now the statement: "Grader sent no response" is printed when the response is null. And the response can be null when the computer is not connected. Hope this is the reason behind your error, if not then let me know.

0
On

Matlab?

This steps may helpful:

open file: submitWithConfiguration.m ; and: goto line 131 and 134;

then change:

line131: json_command = sprintf('echo jsonBody=%s | curl -k -X POST -d @- %s', body, url);

line134: json_command = sprintf('echo ''jsonBody=%s'' | curl -k -X POST -d @- %s', body, url);

to:

line131: json_command = sprintf('echo jsonBody=%s | curl -k -X POST -s -d @- %s', body, url);

line134: json_command = sprintf('echo ''jsonBody=%s'' | curl -k -X POST -s -d @- %s', body, url);

(both add -s)