SolidCharity / LightBuildServer

LightBuildServer for building rpm and deb packages and running CI scripts, using linux containers
BSD 3-Clause "New" or "Revised" License
11 stars 1 forks source link

UnicodeDecodeError exception when reading the build output #169

Closed tpokorra closed 7 years ago

tpokorra commented 7 years ago

this happens for example when building roundcubemail, in the tests there are strange characters.

Traceback (most recent call last):
  File "./../lib/Build.py", line 120, in buildpackage
    if not self.buildHelper.BuildPackage():
  File "./../lib/BuildHelperCentos.py", line 191, in BuildPackage
    if not self.run("rpmbuild -ba rpmbuild/SPECS/" + self.packagename + ".spec"):
  File "./../lib/BuildHelper.py", line 52, in run
    return self.container.executeInContainer(command)
  File "./../lib/LXCContainer.py", line 92, 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 "./../lib/Shell.py", line 41, in executeshell
    line=child.stdout.readline()
  File "/usr/lib64/python3.5/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc1 in position 5026: invalid start byte

I want to avoid the whole build to fail.