-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
get_config_header error on mac #1353
Comments
Same problem here on Ubuntu Server when trying to pull an image. Here more information: docker==2.0.0
docker-py==1.10.6
docker-pycreds==0.2.1
Python 2.7.12
Client:
Version: 1.12.4
API version: 1.24
Go version: go1.6.4
Git commit: 1564f02
Built: Tue Dec 13 00:08:34 2016
OS/Arch: linux/amd64
Server:
Version: 1.12.4
API version: 1.24
Go version: go1.6.4
Git commit: 1564f02
Built: Tue Dec 13 00:08:34 2016
OS/Arch: linux/amd64
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS" Here a snippet to reproduce the issue on my system: >>> import logging
>>> import docker
>>> logging.basicConfig(level=logging.DEBUG)
>>> cli = docker.from_env(assert_hostname=False)
DEBUG:docker.auth.auth:Trying paths: ['/home/mkcroiser/.docker/config.json', '/home/mkcroiser/.dockercfg']
DEBUG:docker.auth.auth:No config file found
>>> cli.images.pull("busybox")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/mkcroiser/.local/lib/python2.7/site-packages/docker/models/images.py", line 256, in pull
self.client.api.pull(name, **kwargs)
File "/home/mkcroiser/.local/lib/python2.7/site-packages/docker/api/image.py", line 333, in pull
header = auth.get_config_header(self, registry)
AttributeError: 'module' object has no attribute 'get_config_header' |
Hey folks, please heed the following recommendations when reporting issues: https://github.com/docker/docker-py/blob/master/CONTRIBUTING.md#reporting-issues I can't help you if I don't know what version you're running. |
You may need to uninstall the pip uninstall docker docker-py
pip install docker Let me know if it helps. |
Hi @shin- , thanks a lot for your help it works again now! |
I have same problem, @shin- Thanks. |
@shin- i can replicate the issue.
its only fixable by uninstalling both packages and reinstalling docker in order to protect users i suggest to move the check from |
So, I fixed this by removing the leftover files after an upgrade
I have upgraded from 1.6 to 2.4.2 Long story here I got this error when I try to run a container for an image which does not exists. here is the test_docker.py code
and here is the output
I done some debugging and i got
While checking the upstream code for release 2.4.2 https://github.com/docker/docker-py/tree/2.4.2-release/docker I saw that there is no auth package... only a module. So, it looks like the trouble is from a bad upgrade. Manual cleanup and all is good :) My versions
|
Describing manual fix for 'module' object has no attribute 'get_config_header' docker/docker-py#1353 https://review.openstack.org/#/c/475526/
Hi, is this still an open bug since Dec 2016? I have same issues, I logged this issue, ansible/ansible#34851, but ansible closed it and referred my back to this issue. I have no clue how to move forward, is docker still working on this issue? Or is it an ansible issue? |
Since this is one of the few that is still open, and since my issue on Ansible have been closed and pointed here, my details: Ansible on Mac - the Controller, RPi3 with Stretch is the 'Managed Host', pip versions are: $ pip freeze
docker on the Managed Host:
Ansible on the Mac Controller:
Python on the RPi
With the above setup, docker_image works, but docker_container does not work. This is after I removed docker-py from the RPi, cleaned up after .../site-packages/auth,
But, sadly cannot get docker_container to work as well, still getting:
But if I pip install docker-py on the 'managed host' or remove it and install pip install docker this does not work. Where to from here? |
According to ansible/ansible#20492, for Failed to import docker-py for docker_container module, now also tried one of @jpriron 's suggestions, also not working:
Just note, these suggestions dates back a year.... An further down, @jpiron suggests, unlike others, to uninstall docker and install docker-py again...
Sadly, ... still the same error. Furtherdown, @appleman suggest: (on the 'managed host')
But sadly, same error. Furtherdown, @appleman suggests to run the playbook with Python3, have no idea how to do this, will study it now...
Furtherdown, @antoinetran clarifies, docker for python3, docker-py for python2.7, so back to the drawing board.
Nope, still not working...., and versions are:
What now????? |
check for a part of this issue is partial metadata corruptio |
Thank you Ronny, should I then just delete this docker folder - will that I checked, pip uninstalled all docker* modules, none left in the folder
|
Dear all, I resolved my controller on Mac, Target on Pi with a test playbook. I created a test bench from Mac to RPi with docker_login, docker_image, docker_container and docker_service. See it here: All my tests pasts, after recreated a Pi from scratch, instructions in the above link as well. I used the standard pi user, and not a user I created myself through ansible. I will not have to go check what I missed out for this created user. The instructions in the above link, installs the stock standard python programs on the TARGET (pi) machine, not using sudo.
Apologies for the 'noise' from me in this issue, maybe this can assist others. |
@IoTPlay docker-compose depends on docker, not on docker-py - so installing docker-py beforehand will ensure a broken install in all cases, please skip docker-py |
Ronny, your comment above is the most important statement of this -and ansible's multitude of issues logged. I wish they will update their software to not ask for the installation of docker-py, it cost me 3 weeks of investigations. please skip docker-pyThank you for your assistance. |
@IoTPlay im glad my suggestion helped, please report this to ansible itself, perhaps linking this issue note that there may be a unintended legacy requirement (changed apis between docker and docker-py) in any case it would help if that mismatch was documented in a more discoverable fashion |
Thanks in advance for the help
What am I doing wrong?
The text was updated successfully, but these errors were encountered: