Closed tpokorra closed 9 years ago
/var/log/lbs.log
shows the stacktrace:
Traceback (most recent call last):
File "/usr/share/lightbuildserver/web/../lib/Build.py", line 94, in buildpackage
if not self.buildHelper.SetupEnvironment(branchname):
File "/usr/share/lightbuildserver/web/../lib/BuildHelper.py", line 96, in SetupEnvironment
if not self.run("cd " + os.path.dirname(setupfile) + "; ./setup.sh " + branchname):
File "/usr/share/lightbuildserver/web/../lib/BuildHelper.py", line 50, in run
return self.container.executeInContainer(command)
File "/usr/share/lightbuildserver/web/../lib/LXCContainer.py", line 86, in executeInContainer
result = self.shell.executeshell('ssh -f -o "StrictHostKeyChecking no" -o Port=' + self.containerPort + ' -i ' + self.SSHContainerPath + "/container_rsa root@" + self.containerIP + " \"export LANG=C; " + command + " 2>&1 && echo \$?\"")
File "/usr/share/lightbuildserver/web/../lib/Shell.py", line 39, in executeshell
line=child.stdout.readline()
File "/usr/lib64/python3.4/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 48: ordinal not in range(128)
see for solution: http://stackoverflow.com/questions/3927151/how-to-make-popen-understand-utf-8-properly
hmm, that does not work.
it seems because I call all commands on the build container with LANG=C
:
LANG=C locale -k charmap
shows:
charmap="ANSI_X3.4-1968"
That would be good if that was UTF-8
LANG=de_DE.UTF_8 locale -k charmap
does not work. still get ANSI_X2.4-1968
it is because of https://docs.python.org/3.2/library/subprocess.html subprocess.popen, universal_newlines = True parameter, that locale.getpreferredencoding() is used
solution is to set ENV LANG in /etc/uwsgi.ini
this happens when installing packages on debian wheezy,
This failure happens on the line EBG_Elektronik because it contains non ascii characters