Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
24137 Weergaven

trainers = []

for sesi in reg.event_id.session_ids :

    iden = sesi.trainer_id.identity_no

    if iden not in trainers :

          trainers.append(iden)

                        

trainer = trainers


str(trainer.encode('utf-8', 'ignore')) +'","'+str(assesor.encode('utf-8', 'ignore')) +'","' +\

Avatar
Annuleer
Beste antwoord

Hi Chaanto,

The trainers list is not string, Check the trainer type, e.g type(trainer). and  pass the return.


Avatar
Annuleer
Beste antwoord

Hello Chaanto,

Obviously list has not attribute like encode so its giving error..

You need to unicode each element of the list individually.

\https://stackoverflow.com/questions/5054333/attributeerror-list-object-has-no-attribute-encode


Thanks!

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
apr. 24
1716
4
nov. 23
5703
0
okt. 23
1449
0
dec. 22
2395
2
dec. 23
19006