View Issue Details

IDProjectCategoryView StatusLast Update
0004314Slicer4Module DICOMpublic2016-12-09 10:56
ReporterattilaAssigned Topieper 
PrioritynormalSeverityminorReproducibilityalways
Status confirmedResolutionopen 
Platformx64OSWindows 10OS Version10.0.14393
Product VersionSlicer 4.6.1 
Target VersionFixed in Version 
Summary0004314: When a non-ASCII character exists in the path a DICOM cannot be opened if only links are imported
Description

When importing a DICOM into the DICOM database, the user has to choose if the data or only links should be added to it.
If the user chooses to add only links (so that data is not necessarily duplicated in the file system) AND the path contains a non-ASCII character (like á,í,?,?,ü,ö,ú,ó,é) then the import seemingly goes okay but when the user tries to open any series from that patient an error pops up, saying:
"Warning: Plugin failed: MultiVolumeImporterPlugin
See python console for error message"

After clicking OK, the error popup is dismissed and the Processing... window pops up but it effectively stays at 0% as long as it is cancelled.

See the Python output in the "Additional information"

If DICOM data is imported, not just the links are added, then things work as expected.

Also if the non-ASCII characters are removed from the path then after deleting and re-importing the same DICOM series, data can be loaded even if "Add link" is selected.

Steps To Reproduce

1.) Import any DICOM (I downloaded one example dataset from imaging.nci.nih.gov but the problem does not depend on the data)
1.5.) Put it in a subdirectory or path that contains any of the above "weird" :) characters. Or try this word: próba
2.) Chose "Add link" when importing the DICOM
3.) Select patient and choose a study/series to load

Additional Information

In the Python console it reads:

Python 2.7.11 (default, Nov 7 2016, 23:29:25) [MSC v.1800 64 bit (AMD64)] on win32

Traceback (most recent call last):
File "D:\Slicerz\Slicer 4.6.2\lib\Slicer-4.6\qt-scripted-modules\DICOMLib\DICOMWidgets.py", line 623, in getLoadablesFromFileLists
loadablesByPlugin[plugin] = plugin.examine(fileLists)
File "D:/Slicerz/Slicer 4.6.2/lib/Slicer-4.6/qt-scripted-modules/MultiVolumeImporterPlugin.py", line 80, in examine
loadables += self.examineFiles(files)
File "D:/Slicerz/Slicer 4.6.2/lib/Slicer-4.6/qt-scripted-modules/MultiVolumeImporterPlugin.py", line 430, in examineFiles
mvNodes = self.initMultiVolumes(subseriesLists[key])
File "D:/Slicerz/Slicer 4.6.2/lib/Slicer-4.6/qt-scripted-modules/MultiVolumeImporterPlugin.py", line 731, in initMultiVolumes
mvNode.SetAttribute('MultiVolume.FrameFileList', frameFileListStr)
TypeError: SetAttribute argument 2: (unicode conversion error)
Warning: Plugin failed: MultiVolumeImporterPlugin

See python console for error message.
('DICOM Plugin failed: %s', 'SetAttribute argument 2: (unicode conversion error)')
Traceback (most recent call last):
File "D:\Slicerz\Slicer 4.6.2\lib\Slicer-4.6\qt-scripted-modules\DICOMLib\DICOMWidgets.py", line 712, in loadCheckedLoadables
self.proceedWithReferencedLoadablesSelection()
File "D:\Slicerz\Slicer 4.6.2\lib\Slicer-4.6\qt-scripted-modules\DICOMLib\DICOMWidgets.py", line 762, in proceedWithReferencedLoadablesSelection
if not plugin.load(loadable):
File "D:/Slicerz/Slicer 4.6.2/lib/Slicer-4.6/qt-scripted-modules/DICOMScalarVolumePlugin.py", line 303, in load
volumeNode = self.loadFilesWithArchetype(loadable.files, loadable.name)
File "D:/Slicerz/Slicer 4.6.2/lib/Slicer-4.6/qt-scripted-modules/DICOMScalarVolumePlugin.py", line 298, in loadFilesWithArchetype
return(volumesLogic.AddArchetypeScalarVolume(files[0],name,0,fileList))
TypeError: AddArchetypeScalarVolume argument 1: (unicode conversion error)

TagsNo tags attached.

Relationships

related to 0004156 resolvedjcfr Encode illegal characters in file names and paths 

Activities

pieper

pieper

2016-12-08 19:04

administrator   ~0014269

I can replicate this issue on my windows 10 computer based on the steps provided.

pieper

pieper

2016-12-08 19:08

administrator   ~0014270

Possible solution: It would be good to move the SlicerWizard utility code that uses the chardet python package into the main slicer.util space so that it could be used in dicom plugins.

https://github.com/Slicer/Slicer/commit/b9aec1d2058c49e979d6e94dedf5e46c1e7d79cc

Issue History

Date Modified Username Field Change
2016-12-08 16:49 attila New Issue
2016-12-08 16:49 attila Status new => assigned
2016-12-08 16:49 attila Assigned To => pieper
2016-12-08 19:04 pieper Note Added: 0014269
2016-12-08 19:04 pieper Status assigned => confirmed
2016-12-08 19:08 pieper Note Added: 0014270
2016-12-09 10:56 pinter Relationship added related to 0004156