fedorov / MultiVolumeImporter

A 3D Slicer module to support import of multi-volume data from non-DICOM sources, and provide plugin for importing such data from images saved in DICOM.
http://wiki.slicer.org/slicerWiki/index.php/Documentation/Nightly/Modules/MultiVolumeImporter
Other
9 stars 25 forks source link

NameError: global name 're' is not defined #10

Closed ricortiz closed 9 years ago

ricortiz commented 9 years ago

I am seeing this error when building against Slicer/Slicer@36eaeaff5917ecb36e38867f7e2dde0615355cd0

Adding the following to MultiVolumeImporter.py solves the issue:

import re

Here is the entire error:

Traceback (most recent call last): File "/home/rortiz/Projects/NIRViewSlicer/build/S-bld/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/MultiVolumeImporter.py", line 189, in onImportButtonClicked self.humanSort(fileNames) File "/home/rortiz/Projects/NIRViewSlicer/build/S-bld/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/MultiVolumeImporter.py", line 155, in humanSort l.sort( key=alphanum_key ) File "/home/rortiz/Projects/NIRViewSlicer/build/S-bld/Slicer-build/lib/Slicer-4.4/qt-scripted-modules/MultiVolumeImporter.py", line 154, in alphanum_key = lambda key: [ convert(c) for c in re.split('([0-9]+)', key) ] NameError: global name 're' is not defined

fedorov commented 9 years ago

Thank you for reporting this. Fixed in https://github.com/fedorov/MultiVolumeImporter/commit/7741251bfc8c9229a0fc02aaf7b12d1326c13091, Slicer updated in r24063.

jcfr commented 9 years ago

@fedorov @ricortiz Thanks for working on this.

This was most likely a side effect of 738a74a9a