Hey, could need some help with this error I don't understand, if someone could also review my code and tell me what's good and what's wrong I take it, all the comments are written in french btw so glhf.
Here is the error : in collected_data_process
name_process = stats['name']
~~~~~^^^^^^^^
TypeError: list indices must be integers or slices, not str
Here is the function where the error appear :
def collected_data_process(self):
#tant que la queue est remplit alors on applique la suite du programme
while not self.data_queue_process.empty():
#en enregistre dans une variable les données stocké dans la queue
stats = self.data_queue_process.get()
#nom process
name_process = stats['name']
#% d'utilisation upload et download
upload_percent = (float(stats['upload_percentage']))
download_percent = (float(stats['upload_percentage']))
#vitesse d'upload et download
upload_speed = (float(stats['upload_speed'][:-4]))
download_speed = (float(stats['download_speed'][:-4]))
#quantité total d'upload et download
upload_total = (float(stats['upload_total']))
downlaod_total = (float(stats['download_total']))```