Skip to content

Commit 45f530d

Browse files
authored
Merge pull request #345 from boazmohar/tiffErrorMsg
Add filename to error message when multi page tif has wrong number of planes
2 parents fd0a1e2 + 61e9ef2 commit 45f530d

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)