Hi @JuanFMontesinos
It’s the first time I’ve used this class, with:
    def __init__
    def __len__(self):
    def __getitem__(self, index):

I have solved this problem by writing
def __len__(self):
       list = os.listdir(self.path_input_1)
       return len(list) 

Now I get no error. Thanks a lot for your precious help.