Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api #103

Closed
tazhate opened this issue Jan 21, 2019 · 3 comments
Closed

api #103

tazhate opened this issue Jan 21, 2019 · 3 comments
Assignees
Labels

Comments

@tazhate
Copy link

tazhate commented Jan 21, 2019

How that can be fixed? =\

tcset focused_bartik --docker --direction incoming --rate 15Mbps
Traceback (most recent call last):
  File "site-packages/docker/api/client.py", line 256, in _raise_for_status
  File "site-packages/requests/models.py", line 940, in raise_for_status
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http+docker:https://localhost/v1.35/containers/json?limit=-1&all=0&size=0&trunc_cmd=0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "cli_tcset.py", line 14, in <module>
  File "tcconfig/tcset.py", line 347, in main
  File "tcconfig/tcset.py", line 227, in run
  File "tcconfig/_main.py", line 34, in _fetch_tc_target_list
  File "tcconfig/_docker.py", line 79, in verify_container
  File "tcconfig/_docker.py", line 59, in __verify_container
  File "site-packages/docker/api/container.py", line 208, in containers
  File "site-packages/docker/api/client.py", line 262, in _result
  File "site-packages/docker/api/client.py", line 258, in _raise_for_status
  File "site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
docker.errors.APIError: 400 Client Error: Bad Request ("client is newer than server (client API version: 1.35, server API version: 1.24)")
[189860] Failed to execute script cli_tcset
@Wolfeg
Copy link

Wolfeg commented Jan 21, 2019

probably should help replacing self.__client = APIClient() to self.__client = APIClient(version='auto') in https://github.com/thombashi/tcconfig/blob/master/tcconfig/_docker.py
or you can specify version (use '1.24' for example) replacing 'auto'

@thombashi thombashi self-assigned this Jan 22, 2019
@thombashi thombashi added the bug label Jan 22, 2019
thombashi added a commit that referenced this issue Jan 22, 2019
Add the version specifier to the APIClient constructor with
the auto value. #103
@thombashi
Copy link
Owner

Thank you for your report and information @tazhate @Wolfeg

Looks like changes to APIClient(version='auto') would be good according to the docker-py document.
I had applied the change at tcconfig 21.6.

@thombashi
Copy link
Owner

I'll close the issue.
Feel free to reopen if you still have any problems about the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants