# Cannot import name 'vtkMRMLMarkupsLineNode' from 'slicer' for ParameterNode definition

**URL:** <https://discourse.slicer.org/t/cannot-import-name-vtkmrmlmarkupslinenode-from-slicer-for-parameternode-definition/35596>\
**Category:** Development\
**Created:** [April 18, 2024, 11:37am UTC](https://discourse.slicer.org/t/cannot-import-name-vtkmrmlmarkupslinenode-from-slicer-for-parameternode-definition/35596 "2024-04-18T11:37:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![arkhanna](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/arkhanna/32/70085_2.png) [@arkhanna](https://discourse.slicer.org/u/arkhanna)\
**Post date:** [April 18, 2024, 11:37am UTC](https://discourse.slicer.org/t/cannot-import-name-vtkmrmlmarkupslinenode-from-slicer-for-parameternode-definition/35596/1 "2024-04-18T11:37:12Z")

</div>

Hello Slicer community! I am trying to make a simple Slicer (5.6.2) extension that requires the user to select a markup line from a dropdown list. I use the Qt designer to create a qMRMLNodeComboBox and set nodeTypes to vtkMRMLMarkupsLineNode. The example extension .py file created by the Extension Wizard includes a section for “Parameter Node” specification (wrapped with @parameterNodeWrapper) that type checks input parameters. I specify that the inputVolume is of type vtkMRMLScalarVolumeNode with `inputVolume: vtkMRMLScalarVolumeNode`. The vtkMRMLScalarVolumeNode type is imported from slicer with from `slicer import vtkMRMLScalarVolumeNode`. This works as expected.

However, when I try to specify the type of another parameter inputLine of type vtkMRMLMarkupsLineNode with `inputLine: vtkMRMLMarkupsLineNode` and add vtkMRMLMarkupsLineNode to the slicer import statement, I get an error upon launching Slicer that says `Cannot import name 'vtkMRMLMarkupsLineNode' from 'slicer'`. What am I missing here?

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [April 18, 2024, 7:05pm UTC](https://discourse.slicer.org/t/cannot-import-name-vtkmrmlmarkupslinenode-from-slicer-for-parameternode-definition/35596/2 "2024-04-18T19:05:32Z")

</div>

> [@arkhanna](#):
>
> and add vtkMRMLMarkupsLineNode to the slicer import statement

I don’t think you need this. Simply use `slicer.vtkMRMLMarkupsLineNode`.

---

<div class="post-metadata">

**Author:** ![mikebind](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@mikebind](https://discourse.slicer.org/u/mikebind)\
**Post date:** [April 19, 2024, 12:16am UTC](https://discourse.slicer.org/t/cannot-import-name-vtkmrmlmarkupslinenode-from-slicer-for-parameternode-definition/35596/3 "2024-04-19T00:16:07Z")

</div>

What you tried should work. Make sure that you don’t have any typos in the name; I am forever accidentally typing `vkt` instead of `vtk`, or you might miss the `s` in `Markups`. I doublechecked that there’s nothing funny about `vtkMRMLMarkupsLineNode` specifically: the following imports without error for me on Slicer 5.6.1

```auto
from slicer import (
    vtkMRMLScalarVolumeNode, 
    vtkMRMLMarkupsROINode, 
    vtkMRMLMarkupsLineNode, 
    vtkMRMLMarkupsFiducialNode, 
    vtkMRMLSegmentationNode
)

```

@cpinter’s suggestion should work equivalently well  
`inputLine: slicer.vtkMRMLMarkupsLineNode`  
The import really just saves you having to type `slicer.` all the time.
