i have an error with this sample code i got from the net... the error says:
TypeError: unsupported operand types for +: 'int' and 'str'

here is the code:

from time import ctime

import codecs
import inbox, appuifw

box = inbox.Inbox()
msg = box.sms_messages()

f = codecs.open('E:/Others/listSMS.txt', 'w', 'utf8') # open file in UTF8
for i in msg:
f.write(box.address(i))
f.write('\n')
f.write(ctime(box.time(i))) # convert seconds in a string
f.write('\n')
f.write(box.content(i))
f.write('\n')
print i +"th SMS backed up" #<-- the error is here
f.close()

appuifw.note(u'All SMS are backed up!', "info")

f = codecs.open('E:/Others/listSMS.txt', 'r', 'utf8')
print f.read()
f.close()

Edited 6 Years Ago by leviaeon: n/a

This question has already been answered. Start a new discussion instead.