I am trying to use Python Pulse Engine 4.x on Ubuntu, however I am getting the following error: Unable to load initial state file whenever I run any of the How To python scripts.
Here’s what I’ve done so far:
I’ve ran cmake-gui (version 3.16.3) with full file path of Pulse/engine/ for the source code location and full file path for Pulse/builds/Release for the location for building binaries. Download_Baselines, Java API, Python API, Superbuild, and Use Git Protocol are all selected. Pressed Configure and Generate.
I’ve run make -j4
PYTHONPATH has been updated with the full file paths for engine/src/python/, builds/Release/Innerbuild/src/python/, and builds/Release/install/bin/
I verified that builds/Release/install/python/pulse/cdm/bind/ is populated with _pb2 scripts.
In PyCharm, I added full paths of engine/src/python/, builds/Release/Innerbuild/src/python/, and builds/Release/install/bin/ to the interpreter paths
In Pycharm Run/Debug Config, I changed the Python template working directory to full path of builds/Release/install/bin/
I have Python 3.8.10
However, when I run HowTo_AcuteStress . py, I get 5 INFO lines (Serializing from file, Human Adult Whole Body, etc) and then Unable to load initial state file
It looks like the issue may be that in the HowTo example files I am having them serialize in a pbb (protobuf binary file) "./states/Soldier@0s.pbb"
The data generation script (./run.sh genData) in pulse used to generate both json and pbb files used to get generated by the pulse build
But, I have made a change that resulted in only the json files getting generated.
I pushed up changes to update all the python examples that load states, to load json states
I believe just pulling that or updating your code to serialize a json (if not pulse.serialize_from_file("./states/Soldier@0s.json", None):) file rather than a pbb file should fix you up.
Your advice worked, thank you. However, I did run into some other issues. HowTo_AcuteStress runs fine, however HowTo_Anemia eventually throws “number of data requests does not match the number of tracked properties!” and “Unable to load stabilize engine.” For whatever reason, it looks like TotalFluid_ml is being tracked but is not being requested.
Another issue is regarding a custom script. I first ran the script in a notebook in the Pulse Binder environment to make sure it is working. I then moved the script to PyCharm where I also modified the paths. However, pulse.initialize_engine seems to be failing as I get Unable to Load Stabilize engine.
Our binder space is not up to date, its still pretty old
I don’t have an automated build step to create and publish a docker container for our binder space.