Loomio
Sun 7 May 2017 8:47PM

docker-compose UnicodeDecodeError while running docker-compose setup db

VL Victor Liendo Public Seen by 386

I haven't been able to setup the database. When I issue the command : docker-compose run loomio rake db:setup, this is the output:

Traceback (most recent call last):
File "", line 3, in
File "compose/cli/main.py", line 56, in main
File "compose/cli/docopt_command.py", line 23, in sys_dispatch
File "compose/cli/docopt_command.py", line 26, in dispatch
File "compose/cli/main.py", line 189, in perform_command
File "compose/cli/command.py", line 52, in project_from_options
File "compose/cli/command.py", line 80, in get_project
File "compose/config/config.py", line 304, in load
File "compose/config/config.py", line 387, in load_services
File "compose/config/config.py", line 370, in build_services
File "compose/config/config.py", line 363, in build_service
File "compose/config/config.py", line 602, in finalize_service
File "compose/config/config.py", line 511, in resolve_environment
File "compose/config/config.py", line 839, in env_vars_from_file
File ".tox/py27/lib/python2.7/codecs.py", line 681, in next
File ".tox/py27/lib/python2.7/codecs.py", line 612, in next
File ".tox/py27/lib/python2.7/codecs.py", line 527, in readline
File ".tox/py27/lib/python2.7/codecs.py", line 474, in read
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc3 in position 0: invalid continuation byte
docker-compose returned -1

I'm trying with this conf

Linux loomio-2017 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux

Any idea of what's happening ?

Víctor

RG

Robert Guthrie Sun 7 May 2017 10:45PM

HI @victorliendo

As I read it. docker-compose a python program, is struggling to read the first byte in a file.

If you run docker-compose --services does the error happen?

PC

Pablo Costa Mon 8 May 2017 11:25AM

@victorliendo : a wild guess: as root, try:

dpkg-reconfigure locales

from the huge list on the first dialog, choose at least one UTF-8 variant, and then choose this UTF-8 variant as the "default locale for the system environment" on the second dialog, e. g.:

[*] en_US.UTF-8 UTF-8

and then

en_US.UTF-8

as root, in a vanilla debian 8 jessie you should be able to see the default with

echo $LANG

if you don't get a UTF-8 variant, after dpkg-reconfigure'ing you should open a new login shell and ensure the $LANG is changed.

VL

Victor Liendo Tue 9 May 2017 1:18PM

Hi Pablo, i've done the very thing you suggested, but nothing has changed. The same error messages. I have even tried with different versions of docker-compose, as someone has recommend, but the situation is the same ...

RG

Robert Guthrie Wed 10 May 2017 10:28PM

@victorliendo does docker-compose run with no arguments? what about docker-compose --services

VL

Victor Liendo Thu 11 May 2017 6:30PM

No problem. docker-compose --services works well. We probably had a problem while creating the virtual machine, so we moved to another one. docker-compose run loomio rake db:setup also works well, but now i have a different problem. I get the "ERROR: unauthorized: authentication required" message ALL THE TIME. I have opened a new thread describing the situation ...