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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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:
*Assertionatassembly.c:1939,conditionis_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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
Can you try running this code to see if it works? https://github.com/DanWBR/DWSIM.Automation.Test.macOS/blob/master/DWSIM.Automation.Test.macOS/Program.cs
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:
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