Error using docker-compose

I’m just starting to use docker-compose. My first attempt was just to get its version (using PowerShell):

C:> docker-compose --version
Traceback (most recent call last):
File “”, line 3, in
File “compose\cli\main.py”, line 55, in main
File “compose\cli\main.py”, line 85, in dispatch
File “compose\cli\docopt_command.py”, line 25, in parse
File “compose\cli\docopt_command.py”, line 12, in docopt_full_help
File “site-packages\docopt.py”, line 575, in docopt
File “site-packages\docopt.py”, line 484, in extras
LookupError: unknown encoding: cp65001
docker-compose returned -1

FYI, ‘docker --version’ gives Docker version 1.11.1, build 5604cbe

Expected behavior

no error

Actual behavior

error

Information

  • the output of:
    • pinata diagnose -u on OSX
    • DockerDebugInfo.ps1 using Powershell on Windows
  • a reproducible case if this is a bug, Dockerfiles FTW
  • page URL if this is a docs issue or the name of a man page
  • host distribution and version ( OSX 10.10.x, OSX 10.11.x, Windows, etc )

Steps to reproduce the behavior

  1. enter the command, as above

There is an open issue for this bug: https://github.com/docker/compose/issues/2775

Check current output encoding:

PS> [Console]::OutputEncoding

BodyName          : utf-8
EncodingName      : Unicode (UTF-8)
HeaderName        : utf-8
WebName           : utf-8
WindowsCodePage   : 1200
IsBrowserDisplay  : True
IsBrowserSave     : True
IsMailNewsDisplay : True
IsMailNewsSave    : True
IsSingleByte      : False
EncoderFallback   : System.Text.EncoderReplacementFallback
DecoderFallback   : System.Text.DecoderReplacementFallback
IsReadOnly        : False
CodePage          : 65001

There’s the unrecognized CodePage. For me, changing OutputEncoding fixed the issue:

PS> [Console]::OutputEncoding = [System.Text.Encoding]::Default
PS> docker-compose --version
docker-compose version 1.8.0-rc1, build 9bf6bc6