elif i == 10: if str(toUtf8(it.text())) == '': lit.append('NULL') else: print str(toUtf8(it.text())) print type(str(toUtf8(it.text()))) lit.append('%s') % (str(toUtf8(it.text())))
Вывод:
1.000
<type ‘str’>
Traceback (most recent call last):
File “/home/serbis/Prog/python/b3/sources/createa/head.py”, line 84, in slot_save
tb.loadData()
File “/home/serbis/Prog/python/b3/sources/createa/table.py”, line 89, in loadData
lit.append('%s') % (str(toUtf8(it.text())))
TypeError: unsupported operand type(s) for %: ‘NoneType’ and ‘str’