Flair 3.2 Installation Problems: UnicodeDecodeError

Hello,

I have a problem with the installation of flair 3.2.
The problem occurs during the installation on lxplus, while I managed to get it working locally (MacOS).

What I do step by step:

Install Flair:

  • I untared flair

  • cd into the folder. For me in the following position:

  • /afs/cern.ch/user/m/mibauer/private/Software/flair-3.2

  • command: make

Install Flair Geoviewer:

  • Untared geoviewer

  • cd into the folder. For me in the following position:

  • /afs/cern.ch/user/m/mibauer/private/Software/flair-geoviewer-3.2

  • command: make

  • save in a variable my path to flair:

  • FPATH=‘/afs/cern.ch/user/m/mibauer/private/Software/flair-3.2’

  • The path was saved successfully, which was tested with

  • echo $FPATH

  • Then I type (within the geoviewer directory) :

  • make install DESTDIR=$FPATH

Try to open Flair

  • I switch to the flair directory and enter:

  • ./flair

  • The following error occurs:

Traceback (most recent call last):
File “./flair.py”, line 3386, in
initialize()
File “./flair.py”, line 3326, in initialize
inputs.init()
File “/afs/cern.ch/user/m/mibauer/private/Software/flair-3.2/inputs.py”, line 94, in init
fluka.init()
File “/afs/cern.ch/user/m/mibauer/private/Software/flair-3.2/fluka/init.py”, line 59, in init
if not cardini.read(filename): return False
File “/opt/rh/rh-python36/root/usr/lib64/python3.6/configparser.py”, line 697, in read
self._read(fp, filename)
File “/opt/rh/rh-python36/root/usr/lib64/python3.6/configparser.py”, line 1015, in _read
for lineno, line in enumerate(fp, start=1):
File “/opt/rh/rh-python36/root/usr/lib64/python3.6/encodings/ascii.py”, line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xc2 in position 1187: ordinal not in range(128)

Can you help?

I use
Python 3.6.12
gcc (GCC) 9.2.0

I already found this topic:

and tried the command
LC_ALL=en_US.UTF-8 flair
which did not help.

Thanks,
Michael

There is some problem with the encoding you are using. Its better to force the flair code to use by default UTF-8 independent of the users encoding.

We will push it that change in the next minor release in the next days

In the mean time, could you do the following

export LC_ALL=en_US.UTF-8
flair

check also the output of the command

locale

Hi @mibauer
the newly updated flair minor release is fixing this error.
Could you please try it

Hi Vasilis,

indeed, the update fixed the bug.

Thanks for your help,
Michael