title: Docker - Timeout value connect was Timeout
body: <p>I have just started out with Docker, and I am currently trying to run <code>docker-compose run --rm setup</code> on a docker-compose.yml file, but whenever I do, I receive the following:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/home/wickywills/.local/bin/docker-compose", line 11, in &lt;module&gt;
      sys.exit(main())
    File "/home/wickywills/.local/lib/python2.7/site-packages/compose/cli/main.py", line 68, in main
      command()
    File "/home/wickywills/.local/lib/python2.7/site-packages/compose/cli/main.py", line 118, in perform_command
      handler(command, command_options)
    File "/home/wickywills/.local/lib/python2.7/site-packages/compose/cli/main.py", line 750, in run
      run_one_off_container(container_options, self.project, service, options)
    File "/home/wickywills/.local/lib/python2.7/site-packages/compose/cli/main.py", line 1136, in run_one_off_container
      rescale=False
    File "/home/wickywills/.local/lib/python2.7/site-packages/compose/project.py", line 388, in up
      warn_for_swarm_mode(self.client)
    File "/home/wickywills/.local/lib/python2.7/site-packages/compose/project.py", line 614, in warn_for_swarm_mode
      info = client.info()
    File "/home/wickywills/.local/lib/python2.7/site-packages/docker/api/daemon.py", line 90, in info
      return self._result(self._get(self._url("/info")), True)
    File "/home/wickywills/.local/lib/python2.7/site-packages/docker/utils/decorators.py", line 46, in inner
      return f(self, *args, **kwargs)
    File "/home/wickywills/.local/lib/python2.7/site-packages/docker/api/client.py", line 189, in _get
      return self.get(url, **self._set_request_timeout(kwargs))
    File "/home/wickywills/.local/lib/python2.7/site-packages/requests/sessions.py", line 515, in get
      return self.request('GET', url, **kwargs)
    File "/home/wickywills/.local/lib/python2.7/site-packages/requests/sessions.py", line 502, in request
      resp = self.send(prep, **send_kwargs)
    File "/home/wickywills/.local/lib/python2.7/site-packages/requests/sessions.py", line 612, in send
      r = adapter.send(request, **kwargs)
    File "/home/wickywills/.local/lib/python2.7/site-packages/requests/adapters.py", line 440, in send
      timeout=timeout
    File "/home/wickywills/.local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 582, in urlopen
      timeout_obj = self._get_timeout(timeout)
    File "/home/wickywills/.local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 309, in _get_timeout
      return Timeout.from_float(timeout)
    File "/home/wickywills/.local/lib/python2.7/site-packages/requests/packages/urllib3/util/timeout.py", line 154, in from_float
      return Timeout(read=timeout, connect=timeout)
    File "/home/wickywills/.local/lib/python2.7/site-packages/requests/packages/urllib3/util/timeout.py", line 97, in __init__
      self._connect = self._validate_timeout(connect, 'connect')
    File "/home/wickywills/.local/lib/python2.7/site-packages/requests/packages/urllib3/util/timeout.py", line 127, in _validate_timeout
      "int or float." % (name, value))
  ValueError: Timeout value connect was Timeout(connect=60, read=60, total=None), but it must be an int or float.
  </code></pre>
  
  <h2>Pip Freeze</h2>
  
  <pre><code>backports.ssl-match-hostname==3.5.0.1
  boto==2.40.0
  cached-property==1.3.0
  certifi==2017.4.17
  chardet==3.0.4
  colorama==0.3.9
  cryptography==1.5
  docker==2.4.2
  docker-compose==1.14.0
  docker-pycreds==0.2.1
  dockerpty==0.4.1
  docopt==0.6.2
  duplicity==0.7.6
  enum34==1.1.6
  functools32==3.2.3.post2
  idna==2.5
  ipaddress==1.0.18
  jsonschema==2.6.0
  lockfile==0.12.2
  mysql-connector-python==2.1.3
  mysql-utilities==1.6.3
  ndg-httpsclient==0.4.2
  paramiko==2.0.0
  pexpect==4.2.0
  ptyprocess==0.5.1
  pyasn1==0.1.9
  pycrypto==2.6.1
  pygobject==3.22.0
  pyodbc==3.0.10
  pyOpenSSL==16.1.0
  pysqlite==2.7.0
  python-cloudfiles==1.7.10
  PyYAML==3.12
  requests==2.18.1
  six==1.10.0
  texttable==0.8.8
  urllib3==1.21.1
  websocket-client==0.44.0
  </code></pre>
  
  <p>Seems like this is a common issue, without a real solution. I am running Ubuntu 16.10, and followed the installation instructions as per the Docker documentation. Can anyone advise?</p>