Skip to content

Commit c725058

Browse files
committed
handle the case where we try to load a valid .h5 file that contains no i-v data
1 parent 4c5c5e7 commit c725058

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

batch_iv_analysis/ivAnalyzer.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,11 @@ def _loadFile(fullPath):
376376
ret.Impp = pixel.attrs['Impp']
377377

378378
# this is all the i-v data
379-
iv_data = pixel['all_measurements']
379+
if 'all_measurements' in pixel:
380+
iv_data = pixel['all_measurements']
381+
else:
382+
print('WARNING: Could not find any data in {:}'.format(fileName), file = logMessages)
383+
return
380384

381385
if 'V_oc dwell' in iv_data.attrs:
382386
ret.ssVoc = iv_data[iv_data.attrs['V_oc dwell']]

0 commit comments

Comments
 (0)