I think the usage of self.filename[1] might be wrong, as the Qt documentation 3 gives the return type as:

(fileNames, selectedFilter)

So I assume self.filename[0] will contain all file names, while self.filename[1] would contain the selectedFilter class, which would fit the error message:

‘All Files ( )’