Menu

Running DWSIM automation2() on manjaro

2021-04-01
2021-12-17
  • Mihály Bence

    Mihály Bence - 2021-04-01

    Dear Daniel!

    I want to use the automation2() interface on a manjaro system, but when I create the automation2() instance I get the following error:
    "Assertion at assembly.c:1939, condition `is_ok (hook_error)' not met, function:mono_assembly_invoke_load_hook_internal, (null) assembly:/usr/lib/mono/4.5/mscorlib.dll type:ReflectionTypeLoadException member:(null)**"

    I use pythonnet as well.

    What could be the problem?

    Thanks in advance,
    Bence


     
  • Alfonso Villegas

    Dear Daniel,

    I get the same error when trying to use Automation2() in a Python script using the pythonnet package. I'm running the script from an IDE (PyCharm, VSCode, tried on both) on macOS:

    * Assertion at assembly.c:1939, condition is_ok (hook_error)' not met, function:mono_assembly_invoke_load_hook_internal, (null) assembly:/Users/alfonsovillegas/opt/anaconda3/envs/DWsimPython38/lib/mono/4.5/mscorlib.dll type:ReflectionTypeLoadException member:(null)
    

    I managed to run my script using IronPython from the terminal but I would really prefer using the simple pythonnet package.

    -
    (I tried running your code "Program.cs" that you linked in your last message but I don't know if it is supposed to work on macOS (it didn't work)).

    Thanks a lot for your help.
    Alfonso

     

    Last edit: Alfonso Villegas 2021-12-17
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.