# Using the XNATSlicer plugin

**URL:** <https://discourse.slicer.org/t/using-the-xnatslicer-plugin/3261>\
**Category:** Support\
**Created:** [June 21, 2018, 6:54pm UTC](https://discourse.slicer.org/t/using-the-xnatslicer-plugin/3261 "2018-06-21T18:54:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ernandez.santos](https://avatars.discourse-cdn.com/v4/letter/e/dec6dc/32.png) [@ernandez.santos](https://discourse.slicer.org/u/ernandez.santos)\
**Post date:** [June 21, 2018, 6:54pm UTC](https://discourse.slicer.org/t/using-the-xnatslicer-plugin/3261/1 "2018-06-21T18:54:23Z")

</div>

Dear

I really want to use the XNATSlicer plugin, although I can not perform the integration through 3D Slicer 4.8.1, it complains the error below.  
I believe I stopped making some steps on the server or on my local machine, do I need to install some library on the server?

Hugs

Ernanez

```
Python 2.7.13 (default, Dec 20 2017, 00:45:45) [MSC v.1800 64 bit (AMD64)] on win32
>>> 
Traceback (most recent call last):
  File "C:/Users/HU/AppData/Roaming/NA-MIC/Extensions-26813/XNATSlicer/lib/Slicer-4.8/qt-scripted-modules/XnatSlicer.py", line 925, in onLoginButtonClicked
    self.beginXnat()
  File "C:/Users/HU/AppData/Roaming/NA-MIC/Extensions-26813/XNATSlicer/lib/Slicer-4.8/qt-scripted-modules/XnatSlicer.py", line 577, in beginXnat
    self.View.begin()
  File "C:\Users\HU\AppData\Roaming\NA-MIC\Extensions-26813\XNATSlicer\lib\Slicer-4.8\qt-scripted-modules\XnatSlicerLib\ui\View.py", line 111, in begin
    "'HOST_NAME' (HOST_URL):\n%s" %(str(e)))
  File "C:\Users\HU\AppData\Roaming\NA-MIC\Extensions-26813\XNATSlicer\lib\Slicer-4.8\qt-scripted-modules\XnatSlicerLib\ui\View.py", line 150, in showError
    msg.replace('HOST_NAME', hostName).\
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 68: ordinal not in range(128)
```

---

<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:** [June 21, 2018, 6:56pm UTC](https://discourse.slicer.org/t/using-the-xnatslicer-plugin/3261/2 "2018-06-21T18:56:31Z")

</div>

It seems that your computer name has special characters in it. Rename your computer to only contain ASCII characters and try again.

---

<div class="post-metadata">

**Author:** ![ernandez.santos](https://avatars.discourse-cdn.com/v4/letter/e/dec6dc/32.png) [@ernandez.santos](https://discourse.slicer.org/u/ernandez.santos)\
**Post date:** [June 21, 2018, 7:49pm UTC](https://discourse.slicer.org/t/using-the-xnatslicer-plugin/3261/3 "2018-06-21T19:49:36Z")

</div>

Hi Iasssoan

What exactly would “HOST\_NAME” be my user, my domain?  
in both cases it has no special character is admin and pacspesquisa.unifesp.br is my domain

---

<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:** [June 21, 2018, 8:10pm UTC](https://discourse.slicer.org/t/using-the-xnatslicer-plugin/3261/4 "2018-06-21T20:10:58Z")

</div>

Host name is the name of the computer. It is not the same as name of user or domain.

I don’t know how much the XNat extension is used anymore. [Girder](http://girder.readthedocs.io/en/latest/) is a new data management platform that Kitware is actively developing that you might consider as well.

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [June 22, 2018, 2:25am UTC](https://discourse.slicer.org/t/using-the-xnatslicer-plugin/3261/5 "2018-06-22T02:25:21Z")

</div>

@ernandez.santos I was going to suggest that you ask on the XNAT forum, but I see you already did here: [https://groups.google.com/d/topic/xnat\_discussion/iPDAXWZ0jms/discussion](https://groups.google.com/d/topic/xnat_discussion/iPDAXWZ0jms/discussion). Based on the lack of responses, it could be that this extension is no longer supported by the XNAT team.

---

<div class="post-metadata">

**Author:** ![Saima](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Saima](https://discourse.slicer.org/u/Saima)\
**Post date:** [March 8, 2024, 1:20am UTC](https://discourse.slicer.org/t/using-the-xnatslicer-plugin/3261/6 "2024-03-08T01:20:41Z")

</div>

Hi Andras,  
i was able to connect properly to the xnat and its showing me the data in the left window but when I try to load one of the data into slicer window on the right its giving me error as follow:

[Qt] QSqlQuery::prepare: database not open  
[Qt] SQL failed:  
[Qt]  
[Qt] Error:  
[Qt] No query Unable to fetch row  
[Qt] Failed to find patient with PatientsName=APT240 and PatientID=APT240  
[Qt] Failed to find patient for SOP Instance UID = 1.3.46.670589.11.42221.5.0.8048.2022112109125589081  
[Qt] Failed to find patient with PatientsName=APT240 and PatientID=APT240  
[Qt] Failed to find patient for SOP Instance UID = 1.3.46.670589.11.42221.5.0.8048.2022112109090012081  
[Qt] Failed to find patient with PatientsName=APT240 and PatientID=APT240  
[Qt] Failed to find patient for SOP Instance UID = 1.3.46.670589.11.42221.5.0.8048.2022112109082171394  
[Qt] Failed to find patient with PatientsName=APT240 and PatientID=APT240  
[Qt] Failed to find patient for SOP Instance UID = 1.3.46.670589.11.42221.5.0.8048.2022112109134992983  
[Qt] Failed to find patient with PatientsName=APT240 and PatientID=APT240  
[Qt] Failed to find patient for SOP Instance UID = 1.3.46.670589.11.42221.5.0.8048.2022112109082131353  
[Qt] Required information (patient name, patient ID, study instance UID) is missing from dataset  
[Qt] Failed to find patient with PatientsName=APT240 and PatientID=APT240  
[Qt] Failed to find patient for SOP Instance UID = 1.3.46.670589.11.42221.5.0.8048.2022112109132302540  
[Qt] Required information (patient name, patient ID, study instance UID) is missing from dataset  
[Qt] Required information (patient name, patient ID, study instance UID) is missing from dataset  
[Qt] Required information (patient name, patient ID, study instance UID) is missing from dataset  
[Qt] Required information (patient name, patient ID, study instance UID) is missing from dataset  
[Qt] Required information (patient name, patient ID, study instance UID) is missing from dataset  
[Qt] Required information (patient name, patient ID, study instance UID) is missing from dataset  
[Qt] Required information (patient name, patient ID, study instance UID) is missing from dataset  
[Qt] Required information (patient name, patient ID, study instance UID) is missing from dataset  
[Qt] Failed to find patient with PatientsName= and PatientID=  
Traceback (most recent call last):  
File “/home/useradmin/Downloads/Slicer-5.7.0-2024-02-06-linux-amd64/slicer.org/Extensions-32706/XNATSlicer/lib/Slicer-5.7/qt-scripted-modules/XnatSlicerLib/io/Workflow\_Load.py”, line 225, in \_\_clearSceneButtonClicked  
self.beginWorkflow()  
File “/home/useradmin/Downloads/Slicer-5.7.0-2024-02-06-linux-amd64/slicer.org/Extensions-32706/XNATSlicer/lib/Slicer-5.7/qt-scripted-modules/XnatSlicerLib/io/Workflow\_Load.py”, line 317, in beginWorkflow  
self.MODULE.XnatIo.startDownloadQueue()  
File “/home/useradmin/Downloads/Slicer-5.7.0-2024-02-06-linux-amd64/slicer.org/Extensions-32706/XNATSlicer/lib/Slicer-5.7/qt-scripted-modules/XnatSlicerLib/ext/Xnat/Xnat.py”, line 681, in startDownloadQueue  
self.runEventCallbacks(‘downloadQueueFinished’)  
File “/home/useradmin/Downloads/Slicer-5.7.0-2024-02-06-linux-amd64/slicer.org/Extensions-32706/XNATSlicer/lib/Slicer-5.7/qt-scripted-modules/XnatSlicerLib/ext/Xnat/Xnat.py”, line 617, in runEventCallbacks  
callback(\*args)  
File “/home/useradmin/Downloads/Slicer-5.7.0-2024-02-06-linux-amd64/slicer.org/Extensions-32706/XNATSlicer/lib/Slicer-5.7/qt-scripted-modules/XnatSlicerLib/io/Workflow\_Load.py”, line 283, in onDownloadFinished  
loader.load()  
File “/home/useradmin/Downloads/Slicer-5.7.0-2024-02-06-linux-amd64/slicer.org/Extensions-32706/XNATSlicer/lib/Slicer-5.7/qt-scripted-modules/XnatSlicerLib/io/Loader\_Dicom.py”, line 169, in load  
return self.loadDicomsFromDatabase(self.extractedFiles)  
File “/home/useradmin/Downloads/Slicer-5.7.0-2024-02-06-linux-amd64/slicer.org/Extensions-32706/XNATSlicer/lib/Slicer-5.7/qt-scripted-modules/XnatSlicerLib/io/Loader\_Dicom.py”, line 223, in loadDicomsFromDatabase  
loadables = dicomScalarVolumePlugin.examine([matchedDatabaseFiles])  
File “/home/useradmin/Downloads/Slicer-5.7.0-2024-02-06-linux-amd64/lib/Slicer-5.7/qt-scripted-modules/DICOMLib/DICOMPlugin.py”, line 157, in examine  
return self.examineForImport(fileList)  
File “/home/useradmin/Downloads/Slicer-5.7.0-2024-02-06-linux-amd64/bin/…/lib/Slicer-5.7/qt-scripted-modules/DICOMScalarVolumePlugin.py”, line 166, in examineForImport  
loadablesForFiles = self.examineFiles(files)  
File “/home/useradmin/Downloads/Slicer-5.7.0-2024-02-06-linux-amd64/bin/…/lib/Slicer-5.7/qt-scripted-modules/DICOMScalarVolumePlugin.py”, line 193, in examineFiles  
seriesUID = slicer.dicomDatabase.fileValue(files[0], self.tags[“seriesUID”])  
IndexError: list index out of range  
[Qt] QSqlQuery::prepare: database not open

what could be the reason. for every data i try to load i get the same error.

thank you

regards,  
Saima

---

<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:** [March 8, 2024, 1:48am UTC](https://discourse.slicer.org/t/using-the-xnatslicer-plugin/3261/7 "2024-03-08T01:48:26Z")

</div>

Please go to the DICOM module and check that the DICOM database has been created (no yellow message is shown near the top-right of the Slicer application window.

---

<div class="post-metadata">

**Author:** ![Saima](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Saima](https://discourse.slicer.org/u/Saima)\
**Post date:** [March 8, 2024, 2:22am UTC](https://discourse.slicer.org/t/using-the-xnatslicer-plugin/3261/8 "2024-03-08T02:22:57Z")

</div>

yup did it. Its running perfectly fine. thanks alot
