Chap evaluate issue

Hi everyone.
I’d successfuly installed chap-core on my local Ubuntu machine.
Still, when I ran the following chap evaluate command in its terminal, it returned an error:

chap evaluate --model-name D:/chap_training/minimalist_example_r/MLproject --dataset-name ISIMIP_dengue_harmonized --dataset-c
ountry brazil --report-filename report.pdf

Error message returned:
FileNotFoundError: [Errno 2] No such file or directory: ‘/D:/chap_training/minimalist_example_r/MLproject’

Any guidance to fix this would be truly appreciated

2- Also, I tried to run the chap evaluate command above in the terminal of my Rstudio and I received the error message : chap command not found
Why did this failled?
Then, what renv is for?
3-
where are the right places to run the chap command “chap evaluate …” ?

Thanks in advance for your responses.

Best,
Amal

Hi! In terms of the file placement when running the command in the terminal it should instead be D:/chap_training/minimalist_example_r/, so just without the MLproject at the end. This was unclear in the tutorial.
2 - For the terminal in Rstudio it appears to be unable to find the global chap installation. There might be ways around this, or you can alternatively repeat the installations steps in the terminal in Rstudio. Note that this would give you two separate Chap installations, which could cause confusion later. My advice is to edit the files in Rstudio and to use the chap commands in a separate terminal outside Rstudio.
In the given example renv is not strictly relevant as no other libraries are used. It is only included so the framework for packages is in place if you choose to build on the example code. In general it is a good tool for handling package versioning in R, similar to uv in Python.
3 - The chap evaluate command should work from any terminal, but apparently not from Rstudio, and I suppose there could be other exceptions. So the terminal where you got the error based on the filename should work fine.

Hi
Thank you so much for your responses and guidance.
following your recommendation about the file path, I rewrote the code like follows:

chap evaluate --model-name D:\chap_training\minimalist_example_r\ –dataset-name ISIMIP_dengue_harmonized --dataset-country brazil --report-filename report.pdf

when I ran this in the terminal of my Ubuntu, I received now the following message:
error_message

Thanks in advance for any guidance to fix this.

P.S:
Please note that I’m running the code from the root directory in the terminal of my Ubuntu

Hi, it looks like you’re specifing a windows path. Are you on a windows computer using WSL? If so you should not use the windows path I think, but the mounted linux paht, something like this:

chap evaluate --model-name /mnt/d/chap_training/minimalist_example_r/ --dataset-name ISIMIP_dengue_harmonized --dataset-country brazil --report-filename report.pdf

Or just naviagate to the folder where the model is and use --model-name ./

Hi
Thank you for your response.
I’m on windows computer using WSL.
I corrected the path and the previous error message no longer appears.
But the one appearing now is below:

validation_error message

Visiting the suggested website didn’t help me solve that issue.
I also checked the MLproject file and found the line " renv_env:renv.lock " but I’m unsure what to change.

Thanks in advance for helping solve this.

Great, then we are one step further. The error message you’re seeing is probably because you have an old chap-core version. It can sometimes be a bit tricky to upgrade the chap version if you have an old one installed. Did you run this command uv tool install chap-core --python 3.13 ? Could you also run chap --version, it should be 1.1.4 or higher

Hi @Knut_Dagestad_Rand
Thank you for your responses and your time.
You are right: the version of my chap is lower than 1.1.4
I just installed the 1.1.4 version of chap.
The issue I’m experiencing now is “Rscript not found” :

Thank you in advance for any suggestion to fix this one too.
Best,
Amal

Ah yes, it seems like R is not installed in your wsl. The documentation was not clear enough about this. I think running apt install r-base should fix it. You might also need to do Rscript -e "install.packages('renv') afterwards

Hi
Installing R in my wsl has fixed the “Rscript not found” issue; thank you once again.
Now, the error I’m experiencing after running the chap evaluate … is below:

shutil.Error: [(‘minimalist_example_r/.Rprofile’, ‘runs/minimalist_example_r/2026-01-23_20-42-28_bfd2cb1e/.Rprofile’, “[Errno 1] Operation not permitted: ‘runs/minimalist_example_r/2026-01-23_20-42-28_bfd2cb1e/.Rprofile’”), (‘minimalist_example_r/input/futureClimateData.csv’, ‘runs/minimalist_example_r/2026-01-23_20-42-28_bfd2cb1e/input/futureClimateData.csv’, “[Errno 1] Operation not permitted: ‘runs/minimalist_example_r/2026-01-23_20-42-28_bfd2cb1e/input/futureClimateData.csv’”), (‘minimalist_example_r/input/trainData.csv’, ‘runs/minimalist_example_r/2026-01-23_20-42-28_bfd2cb1e/input/trainData.csv’, “[Errno 1] Operation not permitted: ‘runs/minimalist_example_r/2026-01-23_20-42-28_bfd2cb1e/input/trainData.csv’”), (<DirEntry ‘input’>, ‘runs/minimalist_example_r/2026-01-23_20-42-28_bfd2cb1e/input’, “[Errno 1] Operation not permitted: ‘runs/minimalist_example_r/2026-01-23_20-42-28_bfd2cb1e/input’”), (‘minimalist_example_r/isolated_run.r’, ‘runs/minimalist_example_r/2026-01-23_20-42-28_bfd2cb1e/isolated_run.r’,

Please find below further details on the screeshot below:

What about that one, please?
Thanks in advance.
Amal

Hi, this might be due to the files being in the windows mount on the wsl. Can you try following this guide and see if that helps? If not, we are looking into solutions for running chap-core not through wsl.

Running chap-core with minimalist_example_r in WSL

The “Operation not permitted” error occurs because files are on the Windows filesystem (/mnt/c/…). WSL has trouble copying file metadata between Windows and Linux filesystems.

Solution: Use WSL’s native Linux filesystem

Step 1: Open WSL terminal

Open your WSL terminal (Ubuntu or whichever distribution you installed).

Step 2: Navigate to your home directory

cd ~

Step 3: Create a working directory (optional)

mkdir -p projects
cd projects

Step 4: Clone the repository

git clone GitHub - dhis2-chap/minimalist_example_r: A minimalist example of how to write a CHAP-compatible forecasting model in R

Step 5: Run chap evaluate from this location

cd minimalist_example_r
chap evaluate … # your chap command here

Important notes

  • Your WSL home directory is typically at /home/your-username/
  • Avoid working in /mnt/c/ or /mnt/d/ paths when using chap-core
  • You can still access these files from Windows using the path \wsl$\Ubuntu\home\your-username\projects\ in File Explorer

Verify you’re in the right location

Before running chap, check your current path:

pwd

It should show something like /home/username/projects/minimalist_example_r — not /mnt/c/…

It works!
I greatly appreciate your guidance.
Thank you for your time and your attention.
Regards,
Amal

Perfect, thanks for going through all the steps :slight_smile: I’ll update the documentation with more detailed instructions for the WSL setup

You’re welcome!
Once again, Thank you.
Best,
Amal

Hi - I am struggling to run my chap evaluate command smoothly. I get a bunch of codes back in response but I can’t understand what I am missing (see below).


Hi!
I think this model requires docker to install. If you want you can install docker (Docker Desktop) and then run the model. But it is ok to not be able to run this model, there are many models that doesnt require docker