question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting TypeError while calling docker.from_env() in v3.1.2

See original GitHub issue

There is a problem with the just-released version 3.1.2:

$ pip list docker | grep docker
docker (3.1.2)

$ python -c 'import docker; docker.from_env()'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/.../env/lib/python2.7/site-packages/docker/client.py", line 81, in from_env
    **kwargs_from_env(**kwargs))
  File "/Users/.../env/lib/python2.7/site-packages/docker/client.py", line 38, in __init__
    self.api = APIClient(*args, **kwargs)
  File "/Users/.../env/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'
exit code 1

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:19

github_iconTop GitHub Comments

33reactions
ice-92commented, Mar 26, 2018

Alright, I somehow fixed it by doing

pip uninstall docker-py
pip uninstall docker-compose
pip install --upgrade --force-reinstall --no-cache-dir docker-compose
3reactions
xingxingcommented, Mar 23, 2018

This bug is shown again in 3.1.4? Docker version 17.12.0-ce, build c97c6d6

➜  ~se_docker git:(master) ✗ docker-compose up -d
Traceback (most recent call last):
  File "/usr/local/bin/docker-compose", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/compose/cli/main.py", line 71, in main
    command()
  File "/usr/local/lib/python2.7/site-packages/compose/cli/main.py", line 124, in perform_command
    project = project_from_options('.', options)
  File "/usr/local/lib/python2.7/site-packages/compose/cli/command.py", line 41, in project_from_options
    compatibility=options.get('--compatibility'),
  File "/usr/local/lib/python2.7/site-packages/compose/cli/command.py", line 121, in get_project
    host=host, environment=environment
  File "/usr/local/lib/python2.7/site-packages/compose/cli/command.py", line 92, in get_client
    environment=environment, tls_version=get_tls_version(environment)
  File "/usr/local/lib/python2.7/site-packages/compose/cli/docker_client.py", line 120, in docker_client
    client = APIClient(**kwargs)
  File "/usr/local/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'
Read more comments on GitHub >

github_iconTop Results From Across the Web

Examples using the Docker Engine SDKs and Docker API
Examples on how to perform a given Docker operation using the Go and Python SDKs and the HTTP API using curl.
Read more >
docker-py error when attempting to get a list of containers
I have received this same error on the docker:stable container and on a server running Ubuntu 18.04. This is an example of how...
Read more >
Changelog
This change aligns with how the cy.visit() command generates urls with query parameters. Addressed in #20302. Features: Added a new configuration option called...
Read more >
Docker SDK for Python - Read the Docs
A Python library for the Docker Engine API. It lets you do anything the docker command does, but from within Python apps –...
Read more >
Changelog — Airflow Documentation
Adds airflow as viable docker command in official image (#12878) ... [AIRFLOW-6821] Success callback not called when task marked as success ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found