OMPython
OMPython copied to clipboard
Issues with lmodel import when using customBuildDirectory
Description
I have issues with the import of other models (lmodel) when setting a customBuildDirectory.
Steps to reproduce
model_path = "C:\LocalData\Gitlab\SBC\sbc-modelica-app\app\files_io\2598988031648\neptune.mo"
INNER_MODELPATH = "Buildingpackage.Buildingmodel"
_dependencies = ["Modelica",
"C:/LocalData/Gitlab/SBC/sbc-modelica-app/libraries/ExternData/ExternData/package.mo",
"C:/LocalData/Gitlab/SBC/sbc-modelica-app/libraries/BuildingSystems/BuildingSystems/package.mo"]
self.__workdir = "C:\LocalData\Gitlab\SBC\sbc-modelica-app\app\files_io\2598988031648"
model = ModelicaSystem(
fileName=model_path,
modelName=INNER_MODELPATH,
lmodel=_dependencies,
variableFilter=OUTPUT_VARIABLE_FILTER,
customBuildDirectory=self.__workdir,
)
on initialization i get the following message. The simulation is executed but runs forever.
Warning: Could not find library bsxml-json in either of: C:/LocalData/OpenModelica/lib//omc/bsxml-json.dll /usr/lib//bsxml-json.dll /lib//bsxml-json.dll /usr/lib//bsxml-json.dll /lib//bsxml-json.dll C:/LocalData/OpenModelica/bin//bsxml-json.dll C:/LocalData/OpenModelica/lib//omc/bsxml-json.dll C:/LocalData/OpenModelica/lib//bsxml-json.dll C:/Users/A200209509/AppData/Roaming/.openmodelica/binaries/Buildingpackage/bsxml-json.dll C:/LocalData/Gitlab/SBC/sbc-modelica-app/app/files_io/2598988031648/Resources/Library/mingw64/bsxml-json.dll C:/LocalData/Gitlab/SBC/sbc-modelica-app/app/files_io/2598988031648/Resources/Library/win64/bsxml-json.dll C:/LocalData/Gitlab/SBC/sbc-modelica-app/app/files_io/2598988031648/Resources/Library/bsxml-json.dll
actually the file could be found here:
C:\LocalData\Gitlab\SBC\sbc-modelica-app\libraries\ExternData\ExternData\Resources\Library\win64\bsxml-json.lib
this is a subpath of the lmodel.
But it is only checking in the customBuildDirectory:
C:/LocalData/Gitlab/SBC/sbc-modelica-app/app/files_io/2598988031648
Expected behavior
Successful import of the lmodel from the absolute path defined in the _dependencies variable
Version and OS
- Python 3.9.13
- OMPython 3.5.1 master
- OpenModelica v1.20.0 (64-bit)
- OS: Windows 10, 64 bit