-
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
docker.from_env() causes TypeError: load_config() got an unexpected keyword argument 'config_dict' #1916
Comments
That's quite odd - Is it possible you have different versions of the package interfering with one another, maybe inside / outside a virtualenv? |
I am running into the same problem. I had to downgrade to docker-py2.7. Currently using docker Version 17.12.0-ce-mac49 I fixed it by removing python and python packages and re-installing python. Installing the legacy docker-py package appears to cause issues when installed along the latest docker package. |
|
Yes, different versions caused an issue on my machine. I had to remove python and re-install it. |
I am getting the same error in a pipenv virtualenv
under
|
Fixed in 3.1.3 |
Have the same issue still with docker 3.3.0
|
You probably have old artifacts messing up your imports. Remove all |
@shin- i am using python 3.6 version and trying to import the docker TypeError: load_config() got an unexpected keyword argument 'config_dict' please tell me whats happing exactly inside the code |
@shin- removed
python version is
On other system, your suggestion helped:
|
You can't have docker and docker-py in the same environment, they're incompatible. |
i'm confused sorry, what should be installed then? just docker?
what is docker-py, then? |
I'm getting the sense that if I'm trying to use the docker module with Python2, I need to install "docker<3", but that's not covered by the module documentation anywhere that I can see? The README suggests to just install 'docker', and the pypi docs suggest 'docker' is compatible with Python2, but if I do that, I end up at this error. |
I'm getting this issue too. Not sure exactly why it's triggering, but I do notice there are two load_config functions:
Looking at the names of the files and directories I wonder if there is an importing order difference that causes it for some people to import the wrong module? Also, this is the output of pip freeze:
Apparently docker is the replacement for docker-py, but does not conflict with it, so they simply install over each other. To fix this you have to uninstall both of them, then install just the right one. (And hope other pypi modules don't pull the old module). |
I hit this running docker-compose after an upgrade of docker-compose, and filed docker/compose#6339 there. Seems worth preventing that failure mode. |
docker-py and docker both can not be installed on the same virtualenv. docker/docker-py#1916 (comment)
docker-py and docker both can not be installed on the same virtualenv. docker/docker-py#1916 (comment)
docker-py and docker both can not be installed on the same virtualenv. docker/docker-py#1916 (comment)
Issue with airflow 2.1.0 was that it had some compatibility issues with python 3.8 even though Airflow suggests that it works fine with python 3.8, I switched to fresh python 3.6 installation and everything worked fine. |
After upgrading docker to Server Version: 17.12.0-ce and docker-py to 3.0.1
Getting error:
When using simple call
Is it a known bug?
What version of docker-py is compatible with docker17.12.0-ce ?
Regards
P.S. downgrading to docker-py2.7 solves the issue
The text was updated successfully, but these errors were encountered: