Skip to Content
Menu
This question has been flagged
2 Replies
24069 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
1664
4
Nov 23
5655
0
Oct 23
1409
0
Dec 22
2348
2
Dec 23
18936