SalomeContextException error on launch

Hello and thank you for the program.

I have been trying to get Salome 9.12.0 Linux universal to work. The errors I get are

./salome 
Traceback (most recent call last):
  File "/home/olividir/Sóttar skrár/SALOME-9.12.0/./salome", line 71, in main
    from salomeContext import SalomeContext, SalomeContextException
  File "/home/olividir/Sóttar skrár/SALOME-9.12.0/BINARIES-CO7/KERNEL/bin/salome/salomeContext.py", line 26, in <module>
    from parseConfigFile import parseConfigFile
  File "/home/olividir/Sóttar skrár/SALOME-9.12.0/BINARIES-CO7/KERNEL/bin/salome/parseConfigFile.py", line 49, in <module>
    class MultiOptSafeConfigParser(configparser.SafeConfigParser):
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/olividir/Sóttar skrár/SALOME-9.12.0/./salome", line 1266, in <module>
    main(args)
  File "/home/olividir/Sóttar skrár/SALOME-9.12.0/./salome", line 1258, in main
    except SalomeContextException as e:
           ^^^^^^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'SalomeContextException' where it is not associated with a value

and mesa-salome reveals the same error

./mesa_salome 
Traceback (most recent call last):
  File "/home/olividir/Sóttar skrár/SALOME-9.12.0/./mesa_salome", line 71, in main
    from salomeContext import SalomeContext, SalomeContextException
  File "/home/olividir/Sóttar skrár/SALOME-9.12.0/BINARIES-CO7/KERNEL/bin/salome/salomeContext.py", line 26, in <module>
    from parseConfigFile import parseConfigFile
  File "/home/olividir/Sóttar skrár/SALOME-9.12.0/BINARIES-CO7/KERNEL/bin/salome/parseConfigFile.py", line 49, in <module>
    class MultiOptSafeConfigParser(configparser.SafeConfigParser):
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/olividir/Sóttar skrár/SALOME-9.12.0/./mesa_salome", line 1283, in <module>
    main(args)
  File "/home/olividir/Sóttar skrár/SALOME-9.12.0/./mesa_salome", line 1275, in main
    except SalomeContextException as e:
           ^^^^^^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'SalomeContextException' where it is not associated with a value

I have not been able to find this exact problem yet, the closest is this issue Issue running Salome at 22.04

cat /etc/os-release 
NAME="EndeavourOS"
PRETTY_NAME="EndeavourOS"
ID="endeavouros"
ID_LIKE="arch"
BUILD_ID="2024.01.25"
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://endeavouros.com"
DOCUMENTATION_URL="https://discovery.endeavouros.com"
SUPPORT_URL="https://forum.endeavouros.com"
BUG_REPORT_URL="https://forum.endeavouros.com/c/general-system/endeavouros-installation"
PRIVACY_POLICY_URL="https://endeavouros.com/privacy-policy-2"
LOGO="endeavouros"

I do not see that I am missing any library, so I am a bit lost here. Any idea to point me into the correct direction highly appreciated.

Can you try to check if installing SALOME ina directory، without space or special characters resolves the reported issue?

If not then we can investigate further.

I have moved the install directly under my main folder /home/olividir. This is the error I get now

[olividir@ProX15 SALOME-9.12.0]$ ./mesa_salome 
/home/olividir/SALOME-9.12.0/BINARIES-CO7/KERNEL/bin/salome/salomeContextUtils.py:184: SyntaxWarning: invalid escape sequence '\['
  contains_list = re.findall('(\[[^\]]*\])', elt)
/home/olividir/SALOME-9.12.0/BINARIES-CO7/KERNEL/bin/salome/salomeContextUtils.py:301: SyntaxWarning: invalid escape sequence '\ '
  cmd = cmd.replace(' ', '\ ').replace('\ ', ' ', 1)
/home/olividir/SALOME-9.12.0/BINARIES-CO7/KERNEL/bin/salome/salomeContextUtils.py:301: SyntaxWarning: invalid escape sequence '\ '
  cmd = cmd.replace(' ', '\ ').replace('\ ', ' ', 1)
/home/olividir/SALOME-9.12.0/BINARIES-CO7/KERNEL/bin/salome/parseConfigFile.py:40: SyntaxWarning: invalid escape sequence '\$'
  pattern = re.compile('\${ ( [^}]* ) }', re.VERBOSE) # string enclosed in ${ and }
Traceback (most recent call last):
  File "/home/olividir/SALOME-9.12.0/./mesa_salome", line 71, in main
    from salomeContext import SalomeContext, SalomeContextException
  File "/home/olividir/SALOME-9.12.0/BINARIES-CO7/KERNEL/bin/salome/salomeContext.py", line 26, in <module>
    from parseConfigFile import parseConfigFile
  File "/home/olividir/SALOME-9.12.0/BINARIES-CO7/KERNEL/bin/salome/parseConfigFile.py", line 49, in <module>
    class MultiOptSafeConfigParser(configparser.SafeConfigParser):
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/olividir/SALOME-9.12.0/./mesa_salome", line 1283, in <module>
    main(args)
  File "/home/olividir/SALOME-9.12.0/./mesa_salome", line 1275, in main
    except SalomeContextException as e:
           ^^^^^^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'SalomeContextException' where it is not associated with a value

I have to say, it is a bit easier to read the error here comparedto my plain terminal

There is some conflict between your Python and SALOME here. Can you try the following:

source SALOME-9.12.0/env_launch.sh
SALOME-9.12.0/salome # or mesa_salome
1 Like

GOD… can’t believe I forgot to source the damn thing. This is running now…
Thank you very much for the help.