.summary(path) error "list index out of range"

Hey guys,
I’m trying to run:

dblock.summary(path)

but it returns me this kind of error:

But in fact, there are supposed to be 59 files.

This is my dblock function:

So what leads to that error in the summary()?
Thanks