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

Error connecting: Error while fetching server API version: HTTPConnection.request() got an unexpected keyword argument 'chunked' #1

Closed
macfreek opened this issue Oct 29, 2023 · 1 comment

Comments

@macfreek
Copy link
Owner

macfreek commented Oct 29, 2023

The build docker container task gives an error:

TASK [Build docker image from Dockerfile] **********************************************************************************************
fatal: [local-container -> localhost]: FAILED! => {"changed": false, "msg": "Error connecting: Error while fetching server API version: HTTPConnection.request() got an unexpected keyword argument 'chunked'"}
@macfreek
Copy link
Owner Author

This is caused by a incompatibility between requests 2.29.0 and/or urllib3 2.0.0, according to ansible-collections/community.docker#611

While the details are not entirely clear to me, the docker module has a workaround in 3.4.5.

Since the docker module is part of the ansible community, I had to upgrade this. The ansible community modules are distrbuted as pip package ansible (https://pypi.org/project/ansible/). (Not to be confused with ansible-core, which contain the actual ansible executable). For me, ansible modules collection version 7.4.0 has this problem and ansible modules collection version 8.1.0 works fine.

So the solution is to:

# sudo pip install ansible --upgrade

or (since I use MacPorts to install ansible):

# sudo port selfupdate
# sudo port install py311-ansible

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

No branches or pull requests

1 participant