Skip to Content
Menu
This question has been flagged
2 Replies
23045 Views

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
Discard
Best Answer

Hi Chaanto,

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


Avatar
Discard
Best Answer

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
Discard
Related Posts Replies Views Activity
0
Apr 24
400
4
Nov 23
4250
0
Oct 23
378
0
Dec 22
1334
2
Dec 23
17353