Unable to load flair

Dear FLUKA experts,

I tried to load flair and then the terminal returned these error.

The result was that I couldn’t open Flair.

Traceback (most recent call last):
  File "/usr/local/flair/flair.py", line 3400, in <module>
    initialize(ini, gui)
  File "/usr/local/flair/flair.py", line 3332, in initialize
    tkFlair.init(ini, gui)
  File "/usr/local/flair/tkFlair.py", line 2002, in init
  File "/usr/local/flair/tkFlair.py", line 574, in openIni
    config.read([systemIni, iniFile], encoding="UTF-8")
  File "/usr/local/flair/lib/config.py", line 25, in read
    super().read(inifiles, *args, **kwargs)
  File "/usr/lib/python3.8/configparser.py", line 697, in read
    self._read(fp, filename)
  File "/usr/lib/python3.8/configparser.py", line 1082, in _read
    raise MissingSectionHeaderError(fpname, lineno, line)
configparser.MissingSectionHeaderError: File contains no section headers.
file: '/home/zsh/.config/flair/flair.ini', line: 1

Could you please teach me how to fix these problems?

Thank you so much for your attention!


Its seems that your /home/zsh/.config/flair/flair.ini file is full of zero-bytes.

  • Can you try to open it in an editor and check if it a normal text file
  • Optionally you can delete this file and start flair again. This way you will lose any possible customization you have in flair (fonts, colors, directories etc…)

Dear Vasilis,

Thank you so much for your answer. I deleted this file and start flair successful.

By the way, could I ask another question? I often need to re-enter the “Fluka Directory”(Config) after I restart ubuntu, but I haven’t change anything about the system.

Is this because I did not set the environment variable? I used .deb files to install fluka and flair.

Thank you so much for your attention!


At exit, flair saves all the configuration in the file ${HOME}/.config/flair/flair.ini
it seems to me that your .config directory is erased after restart, or you don’t have the proper permissions. Can you verify this?