FMPy
FMPy copied to clipboard
Pipe Init Failed. Error Code: 231
Hello.
I am simulation a FMU which works with windows clock. When i load FMU and do instantiate, i meet below error.
[ERROR] fmi2Instantiate: Pipe Init Failed. Error Code: 231
Where the error occurred is,
fmuins = instantiate_fmu(unzipdir=unzipdir, model_description=md)
And the terminal log is as below. [OK] fmi2Instantiate: init [OK] fmi2Instantiate: set startValues [OK] zsBuffer=D:\kk\CodingArea [OK] szPath=C:\Users\Administrator\AppData\Roaming [OK] vECUPath=C:\Users\Administrator\AppData\p4_vecu_sbw_cyt2b.fmu\binaries\win32\p4_vecu_sbw_cyt2b.exe [OK] vECUDir=C:\Users\Administrator\AppData\p4_vecu_sbw_cyt2b.fmu\binaries\win32 [OK] startExternal(). [OK] CreateProcess failed(). [ERROR] fmi2Instantiate: Pipe Init Failed. Error Code: 231
Does anyone knows what's causing it?
Can you share the FMU?
@t-sommer Sorry i cannot share because this FMU is possession of company. Can you share some hypothesis without FMU?
Does unzipdir
contain the file binaries/win32/p4_vecu_sbw_cyt2b.exe
?
@t-sommer
Thanks, the reason was path in the unzipdir
is different from path FMU wrapper set.
Can i change the path for the extract
API?
unzipdir = extract(fmu1)
You can pass the extracted FMU to simulate_fmu()
:
from fmpy import *
unzipdir = extract('p4_vecu_sbw_cyt2b.fmu')
result = simulate_fmu(unzipdir)