Following the instructions in the wiki, I was able to build Pulse with Python API support. I have my PYTHONPATH also updated appropriately. Looks like the pulse.cdm.bind module is missing? See below for the output from running a howto script. What have I misunderstood here? Any ideas.
TIA,
Satish
schimaku@eri:~/Development/Pulse/engine/src/python/pulse/howto$ python3 HowTo_AcuteStress.py
Traceback (most recent call last):
File “HowTo_AcuteStress.py”, line 7, in
from pulse.cpm.PulsePhysiologyEngine import PulsePhysiologyEngine
File “/home/schimaku/Development/Pulse/engine/src/python/pulse/cpm/PulsePhysiologyEngine.py”, line 9, in
from pulse.cdm.io.engine import serialize_actions_to_string,
File “/home/schimaku/Development/Pulse/engine/src/python/pulse/cdm/io/engine.py”, line 6, in
from pulse.cdm.bind.Engine_pb2 import AnyActionData,
ModuleNotFoundError: No module named ‘pulse.cdm.bind’
You should have added 2 paths to your PYTHONPATH, the location of the python shared object, as well as the python folder as part of the pulse source code
Your path should look something like:
ENV PYTHONPATH /source/src/python:/pulse/bin
The error looks like you did not add the folder from the source code…
No, as I mentioned in my original email, that module is missing somehow. There is no folder by name ‘bind’ under ‘cdm’. Have I not installed Pulse correctly? I did use the flag ‘-DPulse_PYTHON_API:BOOL=ON’ in my cmake command.
I found a few issues I needed to correct to get python running.
I pushed them to the head of 3.x, should be a quick rebuild if you make install from the Innerbuild
Thanks. In general, my Python build issues got resolved after I switched to 3.x branch from Master! The build is successful and the ‘bind’ folder is in place.
schimaku@eri:~/Development/Pulse-3.0/engine/src/python/pulse/howto$ python3 HowTo_AcuteStress.py Unable to load initial state file
Could you tell me where to find the inputs necessary to run the scripts in the ‘howto’ folder? Running one of them threw an error as you can see above. Since I am a first time user, my goal is to go through some examples to understand what it is that Pulse can/cannot do. I figured that the scripts in the ‘howto’ folder are a good starting point unless you recommend otherwise.
The HowTo files all load up a saved state that is found in your install/bin/states folder.
In the code, they are specified via a relative directory, so these how to files are expected to be run in the install/bin folder, like this: