Solved by MABtt in post #7 
              
              
                Solved!! After all i just put the wrong type for the encoder here : 
msgTrain = df[df.data_type=='train'].commentaire.astype(str).values.tolist()
msgVal = df[df.data_type=='val'].commentaire.astype(str).values.tolist()

It shouldn’t bee a list!! 
I am not quite sure with wht is happening but … it wo…