Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation of GEANT4 fails with python error #738

Closed
davidrohr opened this issue Jan 19, 2022 · 3 comments · Fixed by #752
Closed

Compilation of GEANT4 fails with python error #738

davidrohr opened this issue Jan 19, 2022 · 3 comments · Fixed by #752

Comments

@davidrohr
Copy link
Contributor

Compiling GEANT4 with alibuild/master, I am getting the following python error:

Traceback (most recent call last):
  File "/home/qon/alice/alibuild/aliBuild", line 133, in <module>
    doMain(args, parser)
  File "/home/qon/alice/alibuild/aliBuild", line 84, in doMain
    sys.exit(doBuild(args, parser))
  File "/home/qon/alice/alibuild/alibuild_helpers/build.py", line 1026, in doBuild
    err = execute("%s -e -x %s/build.sh 2>&1" % (BASH, scriptDir),
  File "/home/qon/alice/alibuild/alibuild_helpers/cmd.py", line 50, in execute
    for line in lines_iterator:
  File "/usr/lib/python-exec/python3.9/../../../lib/python3.9/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe8 in position 1678: invalid continuation byte

Any idea? Is that from the parsing of the log file or what?

@davidrohr
Copy link
Contributor Author

Indeed, it was a problem with alibuild parsing the output of the geant build script.
I disabled that part at /home/qon/alice/alibuild/alibuild_helpers/cmd.py line 50 and then it went through.

@ktf
Copy link
Member

ktf commented Jan 20, 2022

@TimoWilken could you have a look? In other places the solution we had for this is merely:

      try:
        s = s.decode("utf-8")  # to get newlines as such and not as escaped \n
      except:
        s = s.decode("latin-1")  # Workaround issue with some special characters of latin-1 which are not understood by unicode

@ktf
Copy link
Member

ktf commented Jan 20, 2022

however I am not sure here where it needs to be applied, since the code itself is in python, AFAICT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants