Debian Jessie. Installed fig 1.0.1 using:
$ sudo pip install -U fig
$ fig --version
fig 1.0.1
$ fig ps
Traceback (most recent call last):
File "/usr/local/bin/fig", line 9, in <module>
load_entry_point('fig==1.0.1', 'console_scripts', 'fig')()
File "/usr/local/lib/python2.7/dist-packages/fig/cli/main.py", line 31, in main
command.sys_dispatch()
File "/usr/local/lib/python2.7/dist-packages/fig/cli/docopt_command.py", line 21, in sys_dispatch
self.dispatch(sys.argv[1:], None)
File "/usr/local/lib/python2.7/dist-packages/fig/cli/command.py", line 28, in dispatch
super(Command, self).dispatch(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/fig/cli/docopt_command.py", line 24, in dispatch
self.perform_command(*self.parse(argv, global_options))
File "/usr/local/lib/python2.7/dist-packages/fig/cli/command.py", line 56, in perform_command
handler(project, command_options)
File "/usr/local/lib/python2.7/dist-packages/fig/cli/main.py", line 427, in up
insecure_registry=insecure_registry,
File "/usr/local/lib/python2.7/dist-packages/fig/project.py", line 174, in up
for (_, container) in service.recreate_containers(insecure_registry=insecure_registry):
File "/usr/local/lib/python2.7/dist-packages/fig/service.py", line 196, in recreate_containers
containers = self.containers(stopped=True)
File "/usr/local/lib/python2.7/dist-packages/fig/service.py", line 79, in containers
for container in self.client.containers(all=stopped)
File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 493, in containers
res = self._result(self._get(u, params=params), True)
File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 76, in _get
return self.get(url, **self._set_request_timeout(kwargs))
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 469, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 457, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 569, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 362, in send
timeout=timeout
File "/usr/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py", line 516, in urlopen
body=body, headers=headers)
File "/usr/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py", line 299, in _make_request
timeout_obj = self._get_timeout(timeout)
File "/usr/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py", line 279, in _get_timeout
return Timeout.from_float(timeout)
File "/usr/lib/python2.7/dist-packages/requests/packages/urllib3/util/timeout.py", line 152, in from_float
return Timeout(read=timeout, connect=timeout)
File "/usr/lib/python2.7/dist-packages/requests/packages/urllib3/util/timeout.py", line 95, in __init__
self._connect = self._validate_timeout(connect, 'connect')
File "/usr/lib/python2.7/dist-packages/requests/packages/urllib3/util/timeout.py", line 125, 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.
Seems like a versioning issue with a dependency, where a basic timeout value is expected, but an object is sent instead. Any ideas? Thanks!
I just did the same thing (on python 2.7) and it worked for me, here's my pip freeze to compare versions:
PyYAML==3.11
argparse==1.2.1
docker-py==0.5.3
dockerpty==0.3.2
docopt==0.6.2
fig==1.0.1
requests==2.4.3
six==1.8.0
texttable==0.8.1
websocket-client==0.11.0
docker-py and requests are likely the two relevant ones.
$ python --version
Python 2.7.8
Here's pip freeze.
PyYAML==3.11
argparse==1.2.1
docker-py==0.5.3
dockerpty==0.3.2
docopt==0.6.2
fig==1.0.1
requests==2.4.3
six==1.8.0
texttable==0.8.1
urllib3==1.9.1 # since this is mentioned in the backtrace
websocket-client==0.11.0
Appears to be identical. What can I look at next?
If I don't have a fig.yml, fig ps works.
Here's the fig.yml I'm using:
web:
image: wordpress
ports:
- "8000:8000"
Could it be getting the image that is the problem? I'm completely new to fig.
I would suspect either something weird about installing things with pip -U, or some environment variable?
Maybe try in a virtualenv? or look for things in env | grep -i http
$ env | grep -i http
is empty. I'll try a virtualenv next.
Using a virtualenv worked. That's rather strange. Adds another step to my workflow, but better than not having a working environment. Thanks for your help!
Seems that this can still happen if you're using an older urllib3 library which ubuntu appears to still ship.
Most helpful comment
Seems that this can still happen if you're using an older urllib3 library which ubuntu appears to still ship.