coursera/courseraprogramming

Client API version error

Closed this issue · 0 comments

when I run sudo courseraprogramming grade local my-custom-grader.v1.4 $(pwd)/tmp partId JoAlq with docker v1.9.1 (for both client and server), I get the following error:

ERROR:root:Could not set up the container to run the grade command in. Most likely, this means that you specified an inappropriate container id.
ERROR:root:Problem when running command. Sorry!
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/courseraprogramming/main.py", line 96, in main
    return args.func(args)
  File "/usr/lib/python2.7/site-packages/courseraprogramming/commands/grade.py", line 135, in command_grade_local
    inspect = d.inspect_image(image=args.containerId)
  File "/usr/lib/python2.7/site-packages/docker/utils/decorators.py", line 21, in wrapped
    return f(self, resource_id, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/docker/api/image.py", line 143, in inspect_image
    self._get(self._url("/images/{0}/json", image)), True
  File "/usr/lib/python2.7/site-packages/docker/client.py", line 158, in _result
    self._raise_for_status(response)
  File "/usr/lib/python2.7/site-packages/docker/client.py", line 154, in _raise_for_status
    raise errors.APIError(e, response, explanation=explanation)
APIError: 400 Client Error: Bad Request ("client is newer than server (client API version: 1.22, server API version: 1.21)")

It looks like it is using version 1.8.0 of docker-py. When I roll back to 1.7.2, I no longer get this error. Also, if I use docker v1.10.3, I do not have any problems (though that version of docker is not currently supported for production on coursera).