Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipe Init Failed. Error Code: 231 #639

Open
K3ik3i opened this issue Jan 17, 2024 · 5 comments
Open

Pipe Init Failed. Error Code: 231 #639

K3ik3i opened this issue Jan 17, 2024 · 5 comments

Comments

@K3ik3i
Copy link

K3ik3i commented Jan 17, 2024

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?

@t-sommer
Copy link
Contributor

Can you share the FMU?

@K3ik3i
Copy link
Author

K3ik3i commented Jan 17, 2024

@t-sommer
Sorry i cannot share because this FMU is possession of company.
Can you share some hypothesis without FMU?

@t-sommer
Copy link
Contributor

Does unzipdir contain the file binaries/win32/p4_vecu_sbw_cyt2b.exe?

@K3ik3i
Copy link
Author

K3ik3i commented Jan 18, 2024

@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)

@t-sommer
Copy link
Contributor

You can pass the extracted FMU to simulate_fmu():

from fmpy import *

unzipdir = extract('p4_vecu_sbw_cyt2b.fmu')

result = simulate_fmu(unzipdir)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants