'module' object has on attribute 'connection'
Open
Nobody has claimed this yet.
kind/bug
- Dominant language
- Python
- Stars
- 7.2k
- Forks
- 1.7k
- Avg merge
- 13d 8h
- Merged PRs (30d)
- 2
Description
run on ubuntu 3.19.0-23-generic #24~14.04.1-Ubuntu
docker-py version 1.8.1 and 1.8.0 failed, but version 1.7.0,1.7.2 is OK.
root@ide-staging-01:~# pip freeze | grep docker-py && python --version && docker version
docker-py==1.8.1
Python 2.7.6
Client:
Version: 1.11.1
API version: 1.23
Go version: go1.5.4
Git commit: 5604cbe
Built: Tue Apr 26 23:30:23 2016
OS/Arch: linux/amd64
Server:
Version: 1.11.1
API version: 1.23
Go version: go1.5.4
Git commit: 5604cbe
Built: Tue Apr 26 23:30:23 2016
OS/Arch: linux/amd64
root@ide-staging-01:~# uname -a
Linux ide-staging-01 3.19.0-23-generic #24~14.04.1-Ubuntu SMP Wed Jul 8 11:15:13 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
root@ide-staging-01:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty
root@ide-staging-01:~# python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from docker import Client
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/docker/__init__.py", line 20, in <module>
from .client import Client, AutoVersionClient, from_env # flake8: noqa
File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 25, in <module>
from . import api
File "/usr/local/lib/python2.7/dist-packages/docker/api/__init__.py", line 2, in <module>
from .build import BuildApiMixin
File "/usr/local/lib/python2.7/dist-packages/docker/api/build.py", line 9, in <module>
from .. import utils
File "/usr/local/lib/python2.7/dist-packages/docker/utils/__init__.py", line 1, in <module>
from .utils import (
File "/usr/local/lib/python2.7/dist-packages/docker/utils/utils.py", line 33, in <module>
from .. import tls
File "/usr/local/lib/python2.7/dist-packages/docker/tls.py", line 5, in <module>
from .ssladapter import ssladapter
File "/usr/local/lib/python2.7/dist-packages/docker/ssladapter/__init__.py", line 1, in <module>
from .ssladapter import SSLAdapter # flake8: noqa
File "/usr/local/lib/python2.7/dist-packages/docker/ssladapter/ssladapter.py", line 22, in <module>
urllib3.connection.match_hostname = match_hostname
AttributeError: 'module' object has no attribute 'connection'
>>>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with docker/ssladapter/ssladapter.py and follow the import chain shown in the traceback through docker/tls.py and docker/utils/utils.py. Reproduce the failure with the reported Python and docker-py versions, then verify that from docker import Client imports successfully without the AttributeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100