219459f15476426276e24329cdb6f091b5f7cf41,ilastik/applets/dataSelection/dataSelectionGui.py,DataSelectionGui,_createDatasetInfo,#DataSelectionGui#,549

Before Change


        
        // If the file is in a totally different tree from the cwd,
        // then leave the path as absolute.  Otherwise, override with the relative path.
        if relPath is not None and len(os.path.commonprefix([cwd, absPath])) > 1:
            data_path = relPath
            
        if DatasetInfo.fileHasInternalPaths(data_path):
            datasetNames = DatasetInfo.getPossibleInternalPathsFor(absPath)
            if len(datasetNames) == 0:
                raise RuntimeError(f"{file_extension} file {data_path} has no image datasets")

After Change


        roi may be None, in which case it is ignored.
        
        cwd = self.topLevelOperator.WorkingDirectory.value
        try:
            data_path = filePath.absolute().relative_to(cwd)
        except ValueError:
            data_path = filePath.absolute()

        if DatasetInfo.fileHasInternalPaths(data_path):
            datasetNames = DatasetInfo.getPossibleInternalPathsFor(absPath)
            if len(datasetNames) == 0:
                raise RuntimeError(f"{file_extension} file {data_path} has no image datasets")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: ilastik/ilastik
Commit Name: 219459f15476426276e24329cdb6f091b5f7cf41
Time: 2019-06-26
Author: tomaz.vieira@embl.de
File Name: ilastik/applets/dataSelection/dataSelectionGui.py
Class Name: DataSelectionGui
Method Name: _createDatasetInfo


Project Name: MTG/freesound
Commit Name: ce190255e6fdba10133f83c5dd909204a8db3080
Time: 2017-10-31
Author: alastair.porter@upf.edu
File Name: wiki/views.py
Class Name:
Method Name: page


Project Name: lingpy/lingpy
Commit Name: 0b33f535fc0a643d612c7f1d758076f48dac0845
Time: 2012-11-06
Author: mattis.list@gmail.com
File Name: lingpy/algorithm/classes.py
Class Name: WordList
Method Name: getDict