docker.from_env() causes TypeError: load_config() got an unexpected keyword argument 'config_dict'
See original GitHub issueAfter upgrading docker to Server Version: 17.12.0-ce and docker-py to 3.0.1
Getting error:
Traceback (most recent call last): File “<stdin>”, line 1, in <module> File “/usr/lib/python2.7/site-packages/docker/client.py”, line 81, in from_env **kwargs_from_env(**kwargs)) File “/usr/lib/python2.7/site-packages/docker/client.py”, line 38, in init self.api = APIClient(*args, **kwargs) File “/usr/lib/python2.7/site-packages/docker/api/client.py”, line 110, in init config_dict=self._general_configs TypeError: load_config() got an unexpected keyword argument ‘config_dict’
When using simple call
import docker
c = docker.from_env()
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
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:16
Top Results From Across the Web
using logging exception in python Code Example - Code Grepper
Get Python error information with debug output ... discord bot python add bio · TypeError: attrib() got an unexpected keyword argument 'convert' ...
Read more >OpenStack: ChangeLog - Fossies
As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers.
Read more >Learning Web Development With Flask | PDF - Scribd
The official guide to developing web applications with python micro web development framework i.e. Flask. This book will guide you from the very...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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).
You probably have old artifacts messing up your imports. Remove all
docker
anddocker-py
packages (inside/outside virtualenv) then reinstall.