Docker-compose encoding error

I am a log time user of docker on mac. We use docker-compose as part of our build/test process.
Recently I’ve encountered a problem with docker-compose. I’m not sure if this is due to an upgrade or not.
My docker version is the most recent: Version 17.06.0-ce-mac19 (18663) Channel: stable. Docker Compose version is 1.14.0.

The problem is that whenever I’m trying to pull any image from docker, I’m getting the following error:
Pulling mongodb (mongo:3.2)…
Traceback (most recent call last):
File “docker-compose”, line 3, in
File “compose/cli/”, line 68, in main
File “compose/cli/”, line 118, in perform_command
File “compose/cli/”, line 928, in up
File “compose/”, line 427, in up
File “compose/”, line 311, in ensure_image_exists
File “compose/”, line 1016, in pull
File “site-packages/docker/api/”, line 358, in pull
File “site-packages/docker/”, line 50, in get_config_header
File “site-packages/docker/”, line 97, in resolve_authconfig
File “site-packages/docker/”, line 125, in _resolve_authconfig_credstore
File “site-packages/dockerpycreds/”, line 25, in get
File “site-packages/dockerpycreds/”, line 57, in _execute
File “”, line 711, in init
File “”, line 1343, in _execute_child
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe2 in position 0: ordinal not in range(128)

The sample docker-compose.yml file is:

version: "2.1"

    image: mongo:3.2
    command: mongod --smallfiles

Failed to execute script docker-compose

For some “unknown” reasons the OS X credentials store doesn’t work.

You can manually create a ~/.docker/config.json file:

 "auths": {
    "": {
        "auth": "aaaaBBB1112222="

Where auth is: “username:password” base 64 encoded

Removing entire content in ~/.docker/config.json solved the problem for me. Backup the file first for further needs.