# CDash build error: JSON not found

**URL:** <https://discourse.slicer.org/t/cdash-build-error-json-not-found/40241>\
**Category:** Development\
**Tags:** nightlybuild\
**Created:** [November 18, 2024, 12:43pm UTC](https://discourse.slicer.org/t/cdash-build-error-json-not-found/40241 "2024-11-18T12:43:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![acsenrafilho](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/acsenrafilho/32/6217_2.png) [@acsenrafilho](https://discourse.slicer.org/u/acsenrafilho)\
**Post date:** [November 18, 2024, 12:43pm UTC](https://discourse.slicer.org/t/cdash-build-error-json-not-found/40241/1 "2024-11-18T12:43:39Z")

</div>

Hi Slicers,

I have uploaded some projects to the Slicer Extension Index. Some of them presented the following build error:

```bash
error: EXTENSION_FILE CMake variable points to a inexistent file or
  directory: /.../SlicerDTIALPS-build/./Slicer-DTI-ALPS.json
Call Stack (most recent call first):
  /work/Preview/Slicer-0/Extensions/CMake/SlicerExtensionPackageAndUploadTarget.cmake:206 (slicerFunctionExtractExtensionDescriptionFromJson)

```

This example was for the extension: `Slicer-DTI-ALPS`  
Link for the `.json` file in the SlicerExtensionIndex: [ExtensionsIndex/SlicerDTIALPS.json at main · Slicer/ExtensionsIndex · GitHub](https://github.com/Slicer/ExtensionsIndex/blob/main/SlicerDTIALPS.json)

However, a problem occurred to me before uploading this `.json` file. In fact, the building process (I followed the steps in the [Slicer documentation](https://slicer.readthedocs.io/en/latest/developer_guide/extensions.html#linux-and-macos)) did not create a `.json` file but the old `.s4ext` text file.

I manually created the `.json` file to upload to the Slicer Extension Index.

How can I update the build folder to automatically generate the `.json` file? I believe that is the problem to CDash build error…

Note: A strange thing happens to another Slicer Extension ([Brain Volume Refinement](https://slicer.cdash.org/viewBuildError.php?buildid=3593901)) that does all the building process normally, but it has the same building instructions (as far as I know). Hence, the `.json` file was not the problem here… 🤔

Thank you in advance for the assistance!

---

<div class="post-metadata">

**Author:** ![acsenrafilho](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/acsenrafilho/32/6217_2.png) [@acsenrafilho](https://discourse.slicer.org/u/acsenrafilho)\
**Post date:** [November 19, 2024, 8:14pm UTC](https://discourse.slicer.org/t/cdash-build-error-json-not-found/40241/2 "2024-11-19T20:14:01Z")

</div>

As an additional test, I made a brand new Slicer Extension (using the Extension Wizard module) to verify whether the Slicer 5.x version had updated the Extension creation from the previous Slicer 4.x extension pattern (which is the most cases for my previous Slicer extensions codes).

However, after the build had been done (as given at [Extensions — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/developer_guide/extensions.html#linux-and-macos)), the exported file is still a `.s4ext` text file, and I did not found a `.json` instead.

@lassoan @pieper @jamesobutler can someone give some help here, please?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 19, 2024, 10:09pm UTC](https://discourse.slicer.org/t/cdash-build-error-json-not-found/40241/3 "2024-11-19T22:09:13Z")

</div>

Good point, we missed this. Would you give it a try and update the exrension description generation in Slicer to create a json file instead?

---

<div class="post-metadata">

**Author:** ![acsenrafilho](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/acsenrafilho/32/6217_2.png) [@acsenrafilho](https://discourse.slicer.org/u/acsenrafilho)\
**Post date:** [November 21, 2024, 6:35pm UTC](https://discourse.slicer.org/t/cdash-build-error-json-not-found/40241/4 "2024-11-21T18:35:43Z")

</div>

Hi @lassoan

I was trying to understand the Extension Description file writing process through the Slicer code, but I confess that it was a bit confusing to me…

I have compared the git tag `5.6` (which is the stable version at the moment) to the `main` code, however the `ExtensionDescription.py` script is already updated to `json` in the most recent commit.  
[See the line of code](https://github.com/Slicer/Slicer/blob/f10cd8c229b50e4d96e55743385f17482214433a/Utilities/Scripts/SlicerWizard/ExtensionDescription.py#L256) (comparing the tag `5.6` and `main`)

What is a possible adjustment in this case? In my understanding, the Slicer stable version (`5.6` and below) has the old `.s4ext` format as default. Then, after [commit](https://github.com/Slicer/Slicer/commit/437e33804ded22e813a76f81d79f56cbbdcd184b) `437e338` the new `json` file structure is introduced, which is the case for the `slicer preview` building process.

How can I give a different building procedure on each `slicer preview` and `slicer stable` stages?

I am sorry for the long explanation, but I am puzzled about how to help here…

---

<div class="post-metadata">

**Author:** ![acsenrafilho](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/acsenrafilho/32/6217_2.png) [@acsenrafilho](https://discourse.slicer.org/u/acsenrafilho)\
**Post date:** [November 22, 2024, 12:05pm UTC](https://discourse.slicer.org/t/cdash-build-error-json-not-found/40241/5 "2024-11-22T12:05:58Z")

</div>

@lassoan , I think that I narrowed the point to adjustment…

After I rebuilt the Slicer version to `nightly`, using the `main` branch, I noticed that the `Slicer/Utilities/Scripts/SlicerWizard/ExtensionDescription.py` file is already updated to `json` description file formatting.  
However, the extension building process continues to generate the old `.s4ext` file instead. I used the common cmake building command as described in the [Slicer documentation](https://slicer.readthedocs.io/en/latest/developer_guide/extensions.html#build-an-extension).

Then I started to check it out the CMake files to find where it has the mention to `s4ext` and located the `SlicerExtensionCPack.cmake`, [line 79](https://github.com/Slicer/Slicer/blob/45366c6d4d6a769c87a4fc8552c50f8c5c3c428d/CMake/SlicerExtensionCPack.cmake#L79)

I think that this maintains the same `s4ext` extension description, even with the `json` being delegated to the `ExtensionDescription.py`.

Unfortunately, my knowledge of CMake does not allow me to fix this, but I hope I assisted you in checking where it could be fixed in the Slicer code.

Is this correct? Can I help is something else?

---

<div class="post-metadata">

**Author:** ![Thibault\_Pelletier](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/thibault_pelletier/32/4767_2.png) [@Thibault\_Pelletier](https://discourse.slicer.org/u/Thibault_Pelletier)\
**Post date:** [August 8, 2025, 5:55am UTC](https://discourse.slicer.org/t/cdash-build-error-json-not-found/40241/6 "2025-08-08T05:55:08Z")

</div>

Hi everyone,

I know this post is old, but as I was confronted with the same problem and tumbled here, I thought I would post the solution.

The problem comes from a mismatch between the CMake project name and the .json file present on the Slicer Extension Index.

For the packageupload target to work, both names need to be strictly the same.

@lassoan or @jcfr is this information already available in a doc somewhere or should I add an entry to document this behavior for further reference?

Best,

Thibault

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 9, 2025, 9:40pm UTC](https://discourse.slicer.org/t/cdash-build-error-json-not-found/40241/7 "2025-08-09T21:40:22Z")

</div>

It was documented in the extension checklist. It was only enforced by manual review, but now I added an automatic check:

> <https://github.com/Slicer/ExtensionsIndex/pull/2194>
>
> Move filename checks from bash script executed by CircleCI to Python script exec…uted by GitHub actions for consistency and to be able to run on Windows. Moved the unstable pre-commit json file schema check to the other extension validation checks.
> 
> Added tests:
> \- check that the extension description file name matches the project name in the \`CMakeLists.txt\` file
> \- check that the extension can be git cloned
> \- check that a license file can be found in the extension's repository
> \- check that extension category is in the allowed list
> \- check that the extension icon and screenshot URLs are valid image files
> 
> Show repository URL, \`CMakeLists.txt\`, license file in a report in the pull request. This makes quick review of extension submissions a bit easier.
