Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
24131 Представления

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')) +'","' +\

Аватар
Отменить
Лучший ответ

Hi Chaanto,

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


Аватар
Отменить
Лучший ответ

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!

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
апр. 24
1707
4
нояб. 23
5703
0
окт. 23
1443
0
дек. 22
2391
2
дек. 23
18992