diff --git a/pyEvalData/io/palxfel.py b/pyEvalData/io/palxfel.py index c80c039..9c70000 100644 --- a/pyEvalData/io/palxfel.py +++ b/pyEvalData/io/palxfel.py @@ -127,6 +127,7 @@ def parse_raw(self): self.file_name.format(scan_number) + '.h5') try: + os.environ["HDF5_USE_FILE_LOCKING"] = "FALSE" with h5py.File(h5_file, 'r') as h5: header = h5['R{0:04d}/header'.format(scan_number)] @@ -171,6 +172,7 @@ def read_raw_scan_data(self, scan): self.file_name.format(scan.number), self.file_name.format(scan.number) + '.h5') + os.environ["HDF5_USE_FILE_LOCKING"] = "FALSE" with h5py.File(h5_file, 'r') as h5: entry = h5['R{0:04d}'.format(scan.number)] # iterate through data fields diff --git a/pyEvalData/io/sardana_nexus.py b/pyEvalData/io/sardana_nexus.py index ad30613..0be6f71 100644 --- a/pyEvalData/io/sardana_nexus.py +++ b/pyEvalData/io/sardana_nexus.py @@ -25,7 +25,7 @@ from numpy.core.records import fromarrays import nexusformat.nexus as nxs -import os.path as path +import os from .source import Source from .scan import Scan @@ -95,8 +95,9 @@ def parse_raw(self): """ self.log.info('parse_raw') - nxs_file_path = path.join(self.file_path, self.file_name) + nxs_file_path = os.path.join(self.file_path, self.file_name) try: + os.environ["HDF5_USE_FILE_LOCKING"] = "FALSE" nxs_file = nxs.nxload(nxs_file_path, mode='r') except nxs.NeXusError: raise nxs.NeXusError('Sardana NeXus file \'{:s}\' does not exist!'.format( @@ -144,8 +145,9 @@ def read_raw_scan_data(self, scan): """ self.log.info('read_raw_scan_data for scan #{:d}'.format(scan.number)) # try to open the file - nxs_file_path = path.join(self.file_path, self.file_name) + nxs_file_path = os.path.join(self.file_path, self.file_name) try: + os.environ["HDF5_USE_FILE_LOCKING"] = "FALSE" nxs_file = nxs.nxload(nxs_file_path, mode='r') except nxs.NeXusError: raise nxs.NeXusError('Sardana NeXus file \'{:s}\' does not exist!'.format(