# Parameter do not exist warning

**URL:** <https://discourse.slicer.org/t/parameter-do-not-exist-warning/38441>\
**Category:** Support\
**Created:** [September 19, 2024, 11:36am UTC](https://discourse.slicer.org/t/parameter-do-not-exist-warning/38441 "2024-09-19T11:36:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bserrano](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bserrano/32/17034_2.png) [@bserrano](https://discourse.slicer.org/u/bserrano)\
**Post date:** [September 19, 2024, 11:36am UTC](https://discourse.slicer.org/t/parameter-do-not-exist-warning/38441/1 "2024-09-19T11:36:37Z")

</div>

Hi all,

I have a script for automating scalar volume resampling:

```auto
reslicedVolumeNode = slicer.mrmlScene.AddNewNodeByClass("vtkMRMLScalarVolumeNode", name)
    parameters = {
        "outputPixelSpacing":"{:},{:},{:}".format(*[resolution]*3),
        "InputVolume":volumeNode.GetID(),
        "interpolationMode":'bspline',
        "referenceVolume": volumeNode.GetID(),
        "OutputVolume":reslicedVolumeNode.GetID()}
    
    cliNode = slicer.cli.runSync(slicer.modules.resamplescalarvolume, None, parameters)

```

After many experiments, I discovered that the parameter `interpolationMode` should actually be `interpolationType`. However, no error or warning is displayed, so I was unintentionally using the default ‘linear’ interpolation instead of ‘bspline’. Is it possible to implement a warning message to help avoid this kind of mistake? It was quite difficult to debug.  
I guess that the same happens with other modules as well.

Many thanks.

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [September 19, 2024, 12:25pm UTC](https://discourse.slicer.org/t/parameter-do-not-exist-warning/38441/2 "2024-09-19T12:25:58Z")

</div>

> [@bserrano](#):
>
> Is it possible to implement a warning message to help avoid this kind of mistake?

I think that your request cannot be fulfilled (by the relevant developer).

You are basically passing a arbitrary field ‘interpolationMode’ that the reader is not looking for. Unless it checks all keys, it won’t react to unknown inputs. It’s doubtful developers would add an overhead to their code.

If someone else passes in a key type of - “Greetings” : ‘Coucou’ - why should the reader check for this key?

> [@bserrano](#):
>
> It was quite difficult to debug.

Check available keys and values in 'lib/Slicer-5.7/cli-modules/ResampleScalarVolume.xml  
'.
