$ cat docker-compose.yml
version: "3"
services:
bug:
image: hello-world
ports:
- "8000:8000"
$ docker-compose up
ERROR: for bug expected string or buffer
Traceback (most recent call last):
File "/usr/local/bin/docker-compose", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/compose/cli/main.py", line 68, in main
command()
File "/usr/local/lib/python2.7/dist-packages/compose/cli/main.py", line 118, in perform_command
handler(command, command_options)
File "/usr/local/lib/python2.7/dist-packages/compose/cli/main.py", line 926, in up
scale_override=parse_scale_args(options['--scale']),
File "/usr/local/lib/python2.7/dist-packages/compose/project.py", line 424, in up
get_deps
File "/usr/local/lib/python2.7/dist-packages/compose/parallel.py", line 69, in parallel_execute
raise error_to_reraise
TypeError: expected string or buffer
$ docker-compose --version
docker-compose version 1.14.0, build c7bdf9e
$ docker --version
Docker version 17.05.0-ce, build 89658be
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 17.04
Release: 17.04
Codename: zesty
Thanks for the reports everyone, I’m currently working on a 2.4.2 release of the Python SDK that should fix this particular issue. It should be available in the next few hours.
Can confirm the downgrade of
docker
anddocker-compose
resolves the problem. This issue caused all our docker deployments on circle to fail.in my case I changed ports to integers 🍩 and this fixed my issue
Same issue here via python3
Worked yesterday morning, started failing this morning, here is a consul snippet with the port defined (This produces the error above).
If we remove the ports section consul starts.
Python 3 Modules
Work around: docker was updated to 2.4.0 15 hours ago. I reverted back to docker 2.3.0 and it worked.
Works^^
NB: Same error for docker-compose 1.13.0. 1.12.0 seems to work.
For anyone affected, please
pip install -U docker==2.4.2
. Let me know if there are any issues still.Downgrading the docker python library worked for me as well:
Not seeing the problem after a new upgrade on arch, have been working for a couple of days now.
Just a follow up.
I’ve tried to install a new virtualenv and now it is working. Sorry for the false alert.
It seems the culprit on my system was python-docker 2.4, I downgraded to 2.3.0 and Docker / Docker-compose both work with the latest versions!
So if you have this issue try downgrading to python-docker 2.3 first