Skip to content

Commit 61e9ef2

Browse files
committed
Add file name to error message when multi page tif has wrong number of planes and discard_extra is False
1 parent fd0a1e2 commit 61e9ef2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

thunder/images/readers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,8 @@ def getarray(idx_buffer_filename):
374374
pageCount = pageCount - extra
375375
logging.getLogger('thunder').warn('Ignored %d pages in file %s' % (extra, fname))
376376
else:
377-
raise ValueError("nplanes '%d' does not evenly divide '%d'" % (nplanes, pageCount))
377+
raise ValueError("nplanes '%d' does not evenly divide '%d in file %s'" % (nplanes, pageCount,
378+
fname))
378379
values = [ary[i:(i+nplanes)] for i in range(0, pageCount, nplanes)]
379380
else:
380381
values = [ary]

0 commit comments

Comments
 (0)