Followed the appropriate steps in the Wiki to get Pulse working on PyCharm. Attempted to run a HowTo scenario and the following received the following error
Traceback (most recent call last):
File “C:\Windows\System32\Pulse\engine\src\python\pulse\howto\HowTo_AirwayObstruction.py”, line 7, in
from pulse.engine.PulseEngine import PulseEngine
File “c:\windows\system32\pulse\engine\src\python\pulse\engine\PulseEngine.py”, line 6, in
import PyPulse
ModuleNotFoundError: No module named ‘PyPulse’
Attempted to install PyPulse in the PyCharm package manager. I have also checked the bin location and have this file “PyPulse.cp39-win_amd64”
Unsure of what to do next to fix the errors shown.
If my working directory was not set, PyCharm could not find the PyPulse.cp39-win_amd64.pyd which give me the unable to find PyPulse… so I think setting that working directory should work
I set the working directory to install\bin as well as added the same paths into the into the pycharm python interpreter. Same error occurred. Currently using Python 3.11, if that may help diagnose the issue further.
I actually think building my environment is where an issue is occurring now. After reinstalling Python 3.9 the code ran on PyCharm, but failed to find the initial state. I checked the files and some files were missing that were in my original attempt to build the environment
If your build did not finish or you don’t have the expected files in your install/bin, you will also need to generate data via run genData before you run genStates
I believe built the environment successfully into PyCharm as I am able to run the HowTo files successfully. However, trying to make our own code in the HowTo, it fails to find the initial state. I also receive this error
Traceback (most recent call last):
File “C:\Programming\Pulse\engine\src\python\pulse\howto\Test.py”, line 50, in
print(results[‘MeanArterialPressure (mmHg)’][0])
KeyError: ‘MeanArterialPressure (mmHg)’
The written code was running in the Jupyter notebook, as that was where it was created. The only thing done was copying and pasting it over to PyCharm
Working directory is set to install\bin and works when it is set to this directory, any other directory causes the PyPulse error.
Yes the code was written in the Jupyter notebook that was create. It may be usual to mention the the script written was inside the “HowTo_EngineUse” Notebook in Jupyter.
MeanArterialPressure was requested with SEDataRequestManager following the required format
Got it working now! The Jupyter notebook code brought the state from /data/…, there was no /data/ needed in the local Python as that folder didn’t exist. It was copied and pasted over so once the /data/ filepath portion was removed, the initial state was successfully loaded.
I have the same error despite reading the documentation following step by step in two different windows 11 pcs, and these posts. Using PyCharm 17.0.9, python 3.11, cmake 3.28.3. I configured the PYTHONPATH and built from source various times with the same results. I am missing files from the build folder as I cannot find any file on install/bin and no python files on Innerbuild. What am I forgetting here? thank you
I tried Docker desktop but it doesn’t run. Right after I hit run it stops and shows Exited (0) so I don’t know what I’m doing wrong. I am attaching the result of the two files, one for each command as per the documentation (pipe the build)