# NNinteractive URL error

**URL:** <https://discourse.slicer.org/t/nninteractive-url-error/42816>\
**Category:** Support\
**Created:** [May 6, 2025, 7:11pm UTC](https://discourse.slicer.org/t/nninteractive-url-error/42816 "2025-05-06T19:11:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [May 6, 2025, 7:11pm UTC](https://discourse.slicer.org/t/nninteractive-url-error/42816/1 "2025-05-06T19:11:45Z")

</div>

NNinteractive used to work, but with a recent nightly, I am getting this error.

```auto
Traceback (most recent call last):
  File "/home/maga/Downloads/Slicer-5.9.0-2025-04-28-linux-amd64/bin/Python/slicer/util.py", line 3391, in tryWithErrorDisplay
    yield
  File "/home/maga/Downloads/Slicer-5.9.0-2025-04-28-linux-amd64/slicer.org/Extensions-33625/NNInteractive/lib/Slicer-5.9/qt-scripted-modules/SlicerNNInteractive.py", line 1109, in request_to_server
    response = requests.post(*args, **kwargs)
  File "/home/maga/Downloads/Slicer-5.9.0-2025-04-28-linux-amd64/lib/Python/lib/python3.9/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/home/maga/Downloads/Slicer-5.9.0-2025-04-28-linux-amd64/lib/Python/lib/python3.9/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/maga/Downloads/Slicer-5.9.0-2025-04-28-linux-amd64/lib/Python/lib/python3.9/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/maga/Downloads/Slicer-5.9.0-2025-04-28-linux-amd64/lib/Python/lib/python3.9/site-packages/requests/sessions.py", line 697, in send
    adapter = self.get_adapter(url=request.url)
  File "/home/maga/Downloads/Slicer-5.9.0-2025-04-28-linux-amd64/lib/Python/lib/python3.9/site-packages/requests/sessions.py", line 792, in get_adapter
    raise InvalidSchema(f"No connection adapters were found for {url!r}")
requests.exceptions.InvalidSchema: No connection adapters were found for 'localhost:1527/upload_segment'

```

the docker image is running on the same computer. I have tried replacing the address with 0.0.0.0, localhost, 127.0.0.1 as well as the actual IP address. Still getting the same error. There is no output on the docker console (indicating that request reached the server).  
This is on ubuntu 22.04, slicer release 33625.

Same error on using the today’s preview on my Mac, with the same server

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/a/6a3f5b6cf5fa5ee78e035a95978f03a556a62721.jpeg)

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [May 6, 2025, 7:13pm UTC](https://discourse.slicer.org/t/nninteractive-url-error/42816/2 "2025-05-06T19:13:30Z")

</div>

Maybe add http:// to localhost in the url

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [May 6, 2025, 7:14pm UTC](https://discourse.slicer.org/t/nninteractive-url-error/42816/3 "2025-05-06T19:14:18Z")

</div>

additionally there is a separate bug.

If you do not create a segmentation object before switching to NNInteractive, and try to set create the segmentation using the Segment Editor widget in NNInteractive, Slicer application closes with this error:

```auto
[CRITICAL][Qt] 06.05.2025 04:51:27 [] (unknown:0) - void qMRMLSegmentEditorWidget::setSourceVolumeNode(vtkMRMLNode*) failed: need to set segment editor and segmentation nodes first

```

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [May 6, 2025, 7:15pm UTC](https://discourse.slicer.org/t/nninteractive-url-error/42816/4 "2025-05-06T19:15:18Z")

</div>

Himm, that fixed it, but do we really need to specify that?
