From cd3343440ce3e5a7f91d1e0f76c95a29ebb18031 Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Tue, 21 Mar 2017 16:28:53 -0700 Subject: [PATCH 1/2] Change docker-py dependency error to a warning, update fix command Signed-off-by: Joffrey F --- compose/cli/__init__.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/compose/cli/__init__.py b/compose/cli/__init__.py index c5db44558..4061e7091 100644 --- a/compose/cli/__init__.py +++ b/compose/cli/__init__.py @@ -20,16 +20,15 @@ try: list(filter(lambda p: p.startswith(b'docker-py=='), packages)) ) > 0 if dockerpy_installed: - from .colors import red + from .colors import yellow print( - red('ERROR:'), + yellow('WARNING:'), "Dependency conflict: an older version of the 'docker-py' package " - "is polluting the namespace. " - "Run the following command to remedy the issue:\n" - "pip uninstall docker docker-py; pip install docker", + "may be polluting the namespace. " + "If you're experiencing crashes, run the following command to remedy the issue:\n" + "pip uninstall docker-py; pip uninstall docker; pip install docker", file=sys.stderr ) - sys.exit(1) except OSError: # pip command is not available, which indicates it's probably the binary From 962330120dd9294c663ca1a80f263d34c71e58dc Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Thu, 23 Mar 2017 16:43:15 -0700 Subject: [PATCH 2/2] Ignore unicode error in subprocess call Signed-off-by: Joffrey F --- compose/cli/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compose/cli/__init__.py b/compose/cli/__init__.py index 4061e7091..1fe9aab8d 100644 --- a/compose/cli/__init__.py +++ b/compose/cli/__init__.py @@ -34,3 +34,9 @@ except OSError: # pip command is not available, which indicates it's probably the binary # distribution of Compose which is not affected pass +except UnicodeDecodeError: + # ref: https://github.com/docker/compose/issues/4663 + # This could be caused by a number of things, but it seems to be a + # python 2 + MacOS interaction. It's not ideal to ignore this, but at least + # it doesn't make the program unusable. + pass