diff --git a/pynxtools/dataconverter/readers/mpes/reader.py b/pynxtools/dataconverter/readers/mpes/reader.py index fce988f76..ca8315cea 100644 --- a/pynxtools/dataconverter/readers/mpes/reader.py +++ b/pynxtools/dataconverter/readers/mpes/reader.py @@ -198,20 +198,6 @@ def handle_h5_and_json_file(file_paths, objects): f"but {file_path} does not match.", ) - if not os.path.exists(file_path): - file_path = os.path.join( - os.path.dirname(__file__), - "..", - "..", - "..", - "..", - "tests", - "data", - "dataconverter", - "readers", - "mpes", - file_path, - ) if not os.path.exists(file_path): raise FileNotFoundError( errno.ENOENT, @@ -252,7 +238,7 @@ def _getattr(obj, attr): if "index" in attr: axis = attr.split(".")[0] - return str(obj.dims.index(f"{axis}")) + return obj.dims.index(f"{axis}") return reduce(_getattr, [obj] + attr.split("."))